<html>
<head><script>
var $gwt_version = "1.5.3";
var $wnd = parent;
var $doc = $wnd.document;
var $moduleName, $moduleBase;
var $stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent(a);} : null;
$stats && $stats({moduleName:'org.cobogw.gwt.demo.widgets.WidgetsDemo',subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalStart'});
</script></head>
<body>
<script><!--
var _, N8000000000000000_longLit = [0, -9223372036854775808], P1000000_longLit = [16777216, 0], P7fffffffffffffff_longLit = [4294967295, 9223372032559808512];
function equals_0(other){
  return (this == null?null:this) === (other == null?null:other);
}

function hashCode_1(){
  return this.$H || (this.$H = ++sNextHashId);
}

function Object_0(){
}

_ = Object_0.prototype = {};
_.equals$ = equals_0;
_.hashCode$ = hashCode_1;
_.typeMarker$ = nullMethod;
_.typeId$ = 1;
function equals__devirtual$(this$static, other){
  return this$static.typeMarker$ == nullMethod || this$static.typeId$ == 2?this$static.equals$(other):(this$static == null?null:this$static) === (other == null?null:other);
}

function hashCode__devirtual$(this$static){
  return this$static.typeMarker$ == nullMethod || this$static.typeId$ == 2?this$static.hashCode$():this$static.$H || (this$static.$H = ++sNextHashId);
}

var sNextHashId = 0;
function $getFirstChildElement(elem){
  var child = elem.firstChild;
  while (child && child.nodeType != 1)
    child = child.nextSibling;
  return child;
}

function $getParentElement(elem){
  var parent = elem.parentNode;
  if (parent == null) {
    return null;
  }
  if (parent.nodeType != 1)
    parent = null;
  return parent;
}

function $setInnerText(elem, text){
  while (elem.firstChild) {
    elem.removeChild(elem.firstChild);
  }
  if (text != null) {
    elem.appendChild($doc.createTextNode(text));
  }
}

function $getAbsoluteLeft(elem){
  var left = 0;
  var curr = elem.parentNode;
  while (curr && curr.offsetParent) {
    if (curr.tagName != 'TR' && curr.tagName != 'TBODY') {
      left -= curr.scrollLeft;
    }
    curr = curr.parentNode;
  }
  while (elem) {
    left += elem.offsetLeft;
    elem = elem.offsetParent;
  }
  return left;
}

function createFromSeed(seedType, length){
  var seedArray = [null, 0, false, [0, 0]];
  var value = seedArray[seedType];
  var array = new Array(length);
  for (var i = 0; i < length; ++i) {
    array[i] = value;
  }
  return array;
}

function initDim(arrayClass, typeId, queryId, length, seedType){
  var result;
  result = createFromSeed(seedType, length);
  initValues(arrayClass, typeId, queryId, result);
  return result;
}

function initValues(arrayClass, typeId, queryId, array){
  if (!protoTypeArray_0) {
    protoTypeArray_0 = new Array_0();
  }
  wrapArray(array, protoTypeArray_0);
  array.arrayClass$ = arrayClass;
  array.typeId$ = typeId;
  array.queryId$ = queryId;
  return array;
}

function setCheck(array, index, value){
  if (value != null) {
    if (array.queryId$ > 0 && !canCastUnsafe(value.typeId$, array.queryId$)) {
      throw new ArrayStoreException();
    }
    if (array.queryId$ < 0 && (value.typeMarker$ == nullMethod || value.typeId$ == 2)) {
      throw new ArrayStoreException();
    }
  }
  return array[index] = value;
}

function wrapArray(array, protoTypeArray){
  for (var i in protoTypeArray) {
    var toCopy = protoTypeArray[i];
    if (toCopy) {
      array[i] = toCopy;
    }
  }
  return array;
}

function Array_0(){
}

_ = Array_0.prototype = new Object_0();
_.typeId$ = 0;
_.arrayClass$ = null;
_.length = 0;
_.queryId$ = 0;
var protoTypeArray_0 = null;
function canCast(srcId, dstId){
  return srcId && !!typeIdArray[srcId][dstId];
}

function canCastUnsafe(srcId, dstId){
  return srcId && typeIdArray[srcId][dstId];
}

function dynamicCast(src, dstId){
  if (src != null && !canCastUnsafe(src.typeId$, dstId)) {
    throw new ClassCastException();
  }
  return src;
}

function dynamicCastJso(src){
  if (src != null && (src.typeMarker$ == nullMethod || src.typeId$ == 2)) {
    throw new ClassCastException();
  }
  return src;
}

function instanceOf(src, dstId){
  return src != null && canCast(src.typeId$, dstId);
}

var typeIdArray = [{}, {}, {1:1, 26:1, 27:1, 28:1}, {2:1, 26:1}, {2:1, 26:1}, {2:1, 26:1}, {2:1, 26:1}, {2:1, 26:1}, {4:1}, {4:1}, {4:1}, {5:1, 15:1}, {14:1}, {7:1, 11:1, 14:1}, {7:1, 11:1, 13:1, 14:1}, {7:1, 11:1, 13:1, 14:1}, {7:1, 11:1, 13:1, 14:1}, {21:1}, {21:1, 26:1}, {21:1, 26:1}, {21:1, 26:1}, {7:1, 11:1, 14:1}, {7:1, 11:1, 13:1, 14:1}, {7:1, 11:1, 13:1, 14:1}, {7:1, 11:1, 13:1, 14:1}, {7:1, 11:1, 13:1, 14:1}, {7:1, 11:1, 13:1, 14:1}, {7:1, 11:1, 14:1}, {7:1, 11:1, 14:1}, {7:1, 11:1, 14:1}, {7:1, 11:1, 14:1}, {3:1}, {7:1, 11:1, 12:1, 13:1, 14:1}, {5:1, 15:1}, {7:1, 11:1, 12:1, 13:1, 14:1}, {6:1, 15:1}, {4:1}, {20:1}, {7:1, 11:1, 13:1, 14:1, 19:1}, {4:1}, {2:1, 26:1}, {2:1, 26:1}, {2:1, 26:1}, {2:1, 26:1}, {2:1, 26:1}, {2:1, 26:1}, {2:1, 26:1}, {2:1, 26:1}, {2:1, 26:1}, {27:1}, {27:1}, {2:1, 26:1}, {23:1}, {23:1}, {18:1}, {18:1}, {18:1}, {23:1}, {22:1, 26:1}, {23:1, 26:1}, {18:1}, {2:1, 26:1}, {7:1, 11:1, 14:1}, {10:1, 15:1}, {9:1, 15:1}, {9:1, 15:1}, {9:1, 15:1}, {9:1, 15:1}, {9:1, 15:1}, {7:1, 11:1, 14:1}, {31:1}, {7:1, 11:1, 14:1}, {7:1, 11:1, 14:1}, {15:1, 25:1}, {7:1, 11:1, 14:1, 29:1}, {7:1, 11:1, 13:1, 14:1}, {7:1, 11:1, 14:1}, {7:1, 11:1, 14:1}, {7:1, 11:1, 14:1, 30:1}, {7:1, 11:1, 13:1, 14:1}, {7:1, 11:1, 13:1, 14:1}, {7:1, 11:1, 14:1}, {7:1, 11:1, 14:1}, {8:1}, {16:1}, {17:1}];
function create(valueLow, valueHigh){
  var diffHigh, diffLow;
  valueHigh %= 1.8446744073709552E19;
  valueLow %= 1.8446744073709552E19;
  diffHigh = valueHigh % 4294967296;
  diffLow = Math.floor(valueLow / 4294967296) * 4294967296;
  valueHigh = valueHigh - diffHigh + diffLow;
  valueLow = valueLow - diffLow + diffHigh;
  while (valueLow < 0) {
    valueLow += 4294967296;
    valueHigh -= 4294967296;
  }
  while (valueLow > 4294967295) {
    valueLow -= 4294967296;
    valueHigh += 4294967296;
  }
  valueHigh = valueHigh % 1.8446744073709552E19;
  while (valueHigh > 9223372032559808512) {
    valueHigh -= 1.8446744073709552E19;
  }
  while (valueHigh < -9223372036854775808) {
    valueHigh += 1.8446744073709552E19;
  }
  return [valueLow, valueHigh];
}

function fromDouble(value){
  if (isNaN(value)) {
    return $clinit_18() , ZERO;
  }
  if (value < -9223372036854775808) {
    return $clinit_18() , MIN_VALUE;
  }
  if (value >= 9223372036854775807) {
    return $clinit_18() , MAX_VALUE;
  }
  if (value > 0) {
    return create(Math.floor(value), 0);
  }
   else {
    return create(Math.ceil(value), 0);
  }
}

function fromInt(value){
  var rebase, result;
  if (value > -129 && value < 128) {
    rebase = value + 128;
    result = ($clinit_17() , boxedValues)[rebase];
    if (result == null) {
      result = boxedValues[rebase] = internalFromInt(value);
    }
    return result;
  }
  return internalFromInt(value);
}

function internalFromInt(value){
  if (value >= 0) {
    return [value, 0];
  }
   else {
    return [value + 4294967296, -4294967296];
  }
}

function toDouble(a){
  return a[1] + a[0];
}

function $clinit_17(){
  $clinit_17 = nullMethod;
  boxedValues = initDim(_3_3D_classLit, 0, 16, 256, 0);
}

var boxedValues;
function $clinit_18(){
  $clinit_18 = nullMethod;
  Math.log(2);
  MAX_VALUE = P7fffffffffffffff_longLit;
  MIN_VALUE = N8000000000000000_longLit;
  fromInt(-1);
  fromInt(1);
  fromInt(2);
  ZERO = fromInt(0);
}

var MAX_VALUE, MIN_VALUE, ZERO;
function Throwable(){
}

_ = Throwable.prototype = new Object_0();
_.typeId$ = 3;
function Exception(){
}

_ = Exception.prototype = new Throwable();
_.typeId$ = 4;
function RuntimeException(){
}

_ = RuntimeException.prototype = new Exception();
_.typeId$ = 5;
function $CommandCanceledException(this$static){
  return this$static;
}

function CommandCanceledException(){
}

_ = CommandCanceledException.prototype = new RuntimeException();
_.typeId$ = 7;
function $CommandExecutor(this$static){
  this$static.cancellationTimer = $CommandExecutor$1(new CommandExecutor$1(), this$static);
  this$static.commands = $ArrayList(new ArrayList());
  this$static.executionTimer = $CommandExecutor$2(new CommandExecutor$2(), this$static);
  this$static.iterator = $CommandExecutor$CircularIterator(new CommandExecutor$CircularIterator(), this$static);
  return this$static;
}

function $doCommandCanceled(this$static){
  var cmd;
  cmd = $getLast(this$static.iterator);
  $remove(this$static.iterator);
  if (cmd != null && canCast(cmd.typeId$, 3)) {
    $CommandCanceledException(new CommandCanceledException(), dynamicCast(cmd, 3));
  }
   else {
  }
  this$static.executing = false;
  $maybeStartExecutionTimer(this$static);
}

function $doExecuteCommands(this$static, startTimeMillis){
  var element, wasCanceled;
  wasCanceled = false;
  try {
    this$static.executing = true;
    this$static.iterator.end = this$static.commands.size;
    $schedule(this$static.cancellationTimer, 10000);
    while ($hasNext(this$static.iterator)) {
      element = $next(this$static.iterator);
      try {
        if (element == null) {
          return;
        }
        if (element != null && canCast(element.typeId$, 3)) {
          dynamicCast(element, 3);
        }
         else {
        }
      }
       finally {
        wasCanceled = this$static.iterator.last == -1;
        if (wasCanceled) {
          return;
        }
        $remove(this$static.iterator);
      }
      if ((new Date()).getTime() - startTimeMillis >= 100) {
        return;
      }
    }
  }
   finally {
    if (!wasCanceled) {
      $cancel(this$static.cancellationTimer);
      this$static.executing = false;
      $maybeStartExecutionTimer(this$static);
    }
  }
}

function $maybeStartExecutionTimer(this$static){
  if (this$static.commands.size != 0 && !this$static.executionTimerPending && !this$static.executing) {
    this$static.executionTimerPending = true;
    $schedule(this$static.executionTimer, 1);
  }
}

function $submit(this$static, command){
  $add_3(this$static.commands, command);
  $maybeStartExecutionTimer(this$static);
}

function CommandExecutor(){
}

_ = CommandExecutor.prototype = new Object_0();
_.typeId$ = 0;
_.executing = false;
_.executionTimerPending = false;
function $clinit_34(){
  $clinit_34 = nullMethod;
  timers = $ArrayList(new ArrayList());
  addWindowCloseListener(new Timer$1());
}

function $cancel(this$static){
  if (this$static.isRepeating) {
    $wnd.clearInterval(this$static.timerId);
  }
   else {
    $wnd.clearTimeout(this$static.timerId);
  }
  $remove_7(timers, this$static);
}

function $fireImpl(this$static){
  if (!this$static.isRepeating) {
    $remove_7(timers, this$static);
  }
  this$static.run();
}

function $schedule(this$static, delayMillis){
  if (delayMillis <= 0) {
    throw new IllegalArgumentException();
  }
  $cancel(this$static);
  this$static.isRepeating = false;
  this$static.timerId = createTimeout(this$static, delayMillis);
  $add_3(timers, this$static);
}

function createTimeout(timer, delay){
  return $wnd.setTimeout(function(){
    timer.fire();
  }
  , delay);
}

function fire(){
  $fireImpl(this);
}

function Timer(){
}

_ = Timer.prototype = new Object_0();
_.fire = fire;
_.typeId$ = 8;
_.isRepeating = false;
_.timerId = 0;
var timers;
function $clinit_23(){
  $clinit_23 = nullMethod;
  $clinit_34();
}

function $CommandExecutor$1(this$static, this$0){
  $clinit_23();
  this$static.this$0 = this$0;
  return this$static;
}

function run(){
  if (!this.this$0.executing) {
    return;
  }
  $doCommandCanceled(this.this$0);
}

function CommandExecutor$1(){
}

_ = CommandExecutor$1.prototype = new Timer();
_.run = run;
_.typeId$ = 9;
_.this$0 = null;
function $clinit_24(){
  $clinit_24 = nullMethod;
  $clinit_34();
}

function $CommandExecutor$2(this$static, this$0){
  $clinit_24();
  this$static.this$0 = this$0;
  return this$static;
}

function run_0(){
  this.this$0.executionTimerPending = false;
  $doExecuteCommands(this.this$0, (new Date()).getTime());
}

function CommandExecutor$2(){
}

_ = CommandExecutor$2.prototype = new Timer();
_.run = run_0;
_.typeId$ = 10;
_.this$0 = null;
function $CommandExecutor$CircularIterator(this$static, this$0){
  this$static.this$0 = this$0;
  return this$static;
}

function $getLast(this$static){
  return $get_1(this$static.this$0.commands, this$static.last);
}

function $hasNext(this$static){
  return this$static.next < this$static.end;
}

function $next(this$static){
  var command;
  this$static.last = this$static.next;
  command = $get_1(this$static.this$0.commands, this$static.next++);
  if (this$static.next >= this$static.end) {
    this$static.next = 0;
  }
  return command;
}

function $remove(this$static){
  $remove_6(this$static.this$0.commands, this$static.last);
  --this$static.end;
  if (this$static.last <= this$static.next) {
    if (--this$static.next < 0) {
      this$static.next = 0;
    }
  }
  this$static.last = -1;
}

function hasNext(){
  return this.next < this.end;
}

function next_0(){
  return $next(this);
}

function CommandExecutor$CircularIterator(){
}

_ = CommandExecutor$CircularIterator.prototype = new Object_0();
_.hasNext = hasNext;
_.next_0 = next_0;
_.typeId$ = 0;
_.end = 0;
_.last = -1;
_.next = 0;
_.this$0 = null;
function dispatchEventImpl(evt, elem, listener){
  var prevCurrentEvent;
  if (elem == sCaptureElem) {
    if ($eventGetTypeInt(evt) == 8192) {
      sCaptureElem = null;
    }
  }
  prevCurrentEvent = currentEvent;
  currentEvent = evt;
  try {
    listener.onBrowserEvent(evt);
  }
   finally {
    currentEvent = prevCurrentEvent;
  }
}

function releaseCapture(elem){
  if (!!sCaptureElem && elem == sCaptureElem) {
    sCaptureElem = null;
  }
  $maybeInitializeEventSystem();
  $releaseCaptureImpl(elem);
}

function setCapture(elem){
  sCaptureElem = elem;
  $maybeInitializeEventSystem();
  captureElem = elem;
}

function sinkEvents(elem, eventBits){
  $maybeInitializeEventSystem();
  elem.__eventBits = eventBits;
  elem.onclick = eventBits & 1?dispatchEvent_0:null;
  elem.ondblclick = eventBits & 2?dispatchEvent_0:null;
  elem.onmousedown = eventBits & 4?dispatchEvent_0:null;
  elem.onmouseup = eventBits & 8?dispatchEvent_0:null;
  elem.onmouseover = eventBits & 16?dispatchEvent_0:null;
  elem.onmouseout = eventBits & 32?dispatchEvent_0:null;
  elem.onmousemove = eventBits & 64?dispatchEvent_0:null;
  elem.onkeydown = eventBits & 128?dispatchEvent_0:null;
  elem.onkeypress = eventBits & 256?dispatchEvent_0:null;
  elem.onkeyup = eventBits & 512?dispatchEvent_0:null;
  elem.onchange = eventBits & 1024?dispatchEvent_0:null;
  elem.onfocus = eventBits & 2048?dispatchEvent_0:null;
  elem.onblur = eventBits & 4096?dispatchEvent_0:null;
  elem.onlosecapture = eventBits & 8192?dispatchEvent_0:null;
  elem.onscroll = eventBits & 16384?dispatchEvent_0:null;
  elem.onload = eventBits & 32768?dispatchEvent_0:null;
  elem.onerror = eventBits & 65536?dispatchEvent_0:null;
  elem.onmousewheel = eventBits & 131072?dispatchEvent_0:null;
  elem.oncontextmenu = eventBits & 262144?dispatchEvent_0:null;
}

var currentEvent = null, sCaptureElem = null;
function $clinit_29(){
  $clinit_29 = nullMethod;
  commandExecutor = $CommandExecutor(new CommandExecutor());
}

function addCommand(cmd){
  $clinit_29();
  if (!cmd) {
    throw new NullPointerException();
  }
  $submit(commandExecutor, cmd);
}

var commandExecutor;
function $clinit_32(){
  $clinit_32 = nullMethod;
  impl = ($clinit_41() , $clinit_42() , new HistoryImplStandard());
  if (!$init(impl)) {
    impl = null;
  }
}

var impl = null;
function onWindowClosed(){
  while (($clinit_34() , timers).size > 0) {
    $cancel(dynamicCast($get_1(timers, 0), 4));
  }
}

function onWindowClosing(){
  return null;
}

function Timer$1(){
}

_ = Timer$1.prototype = new Object_0();
_.onWindowClosed = onWindowClosed;
_.onWindowClosing = onWindowClosing;
_.typeId$ = 11;
function addWindowCloseListener(listener){
  maybeInitializeHandlers();
  if (!closingListeners) {
    closingListeners = $ArrayList(new ArrayList());
  }
  $add_3(closingListeners, listener);
}

function addWindowResizeListener(listener){
  maybeInitializeHandlers();
  if (!resizeListeners) {
    resizeListeners = $ArrayList(new ArrayList());
  }
  $add_3(resizeListeners, listener);
}

function fireClosedImpl(){
  var listener, listener$iterator;
  if (closingListeners) {
    for (listener$iterator = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), closingListeners); listener$iterator.i < listener$iterator.this$0.size_0();) {
      listener = dynamicCast($next_1(listener$iterator), 5);
      listener.onWindowClosed();
    }
  }
}

function fireClosingImpl(){
  var listener, listener$iterator, msg, ret;
  ret = null;
  if (closingListeners) {
    for (listener$iterator = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), closingListeners); listener$iterator.i < listener$iterator.this$0.size_0();) {
      listener = dynamicCast($next_1(listener$iterator), 5);
      msg = listener.onWindowClosing();
      ret = msg;
    }
  }
  return ret;
}

function fireResizedImpl(){
  var listener, listener$iterator;
  if (resizeListeners) {
    for (listener$iterator = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), resizeListeners); listener$iterator.i < listener$iterator.this$0.size_0();) {
      listener = dynamicCast($next_1(listener$iterator), 6);
      $onWindowResized(listener, (getBodyElement().clientWidth , getBodyElement().clientHeight));
    }
  }
}

function init(){
  __gwt_initHandlers(function(){
    fireResizedImpl();
  }
  , function(){
    return fireClosingImpl();
  }
  , function(){
    fireClosedImpl();
  }
  );
}

function maybeInitializeHandlers(){
  if (!handlersAreInitialized) {
    init();
    handlersAreInitialized = true;
  }
}

var closingListeners = null, handlersAreInitialized = false, resizeListeners = null;
function $eventGetTypeInt(evt){
  switch (evt.type) {
    case 'blur':
      return 4096;
    case 'change':
      return 1024;
    case 'click':
      return 1;
    case 'dblclick':
      return 2;
    case 'focus':
      return 2048;
    case 'keydown':
      return 128;
    case 'keypress':
      return 256;
    case 'keyup':
      return 512;
    case 'load':
      return 32768;
    case 'losecapture':
      return 8192;
    case 'mousedown':
      return 4;
    case 'mousemove':
      return 64;
    case 'mouseout':
      return 32;
    case 'mouseover':
      return 16;
    case 'mouseup':
      return 8;
    case 'scroll':
      return 16384;
    case 'error':
      return 65536;
    case 'mousewheel':
      return 131072;
    case 'DOMMouseScroll':
      return 131072;
    case 'contextmenu':
      return 262144;
  }
}

function $maybeInitializeEventSystem(){
  if (!eventSystemIsInitialized) {
    $initEventSystem();
    eventSystemIsInitialized = true;
  }
}

function isMyListener(object){
  return object != null && canCast(object.typeId$, 7) && !(object != null && (object.typeMarker$ != nullMethod && object.typeId$ != 2));
}

var eventSystemIsInitialized = false;
function $eventGetButton(evt){
  var button = evt.which;
  if (button == 2) {
    return 4;
  }
   else if (button == 3) {
    return 2;
  }
  return button || 0;
}

function $initEventSystem(){
  dispatchCapturedMouseEvent = function(evt){
    if (dispatchCapturedEvent(evt)) {
      var cap = captureElem;
      if (cap && cap.__listener) {
        if (isMyListener(cap.__listener)) {
          dispatchEventImpl(evt, cap, cap.__listener);
          evt.stopPropagation();
        }
      }
    }
  }
  ;
  dispatchCapturedEvent = function(evt){
    return true;
  }
  ;
  dispatchEvent_0 = function(evt){
    var listener, curElem = this;
    while (curElem && !(listener = curElem.__listener)) {
      curElem = curElem.parentNode;
    }
    if (curElem && curElem.nodeType != 1) {
      curElem = null;
    }
    if (listener) {
      if (isMyListener(listener)) {
        dispatchEventImpl(evt, curElem, listener);
      }
    }
  }
  ;
  $wnd.addEventListener('click', dispatchCapturedMouseEvent, true);
  $wnd.addEventListener('dblclick', dispatchCapturedMouseEvent, true);
  $wnd.addEventListener('mousedown', dispatchCapturedMouseEvent, true);
  $wnd.addEventListener('mouseup', dispatchCapturedMouseEvent, true);
  $wnd.addEventListener('mousemove', dispatchCapturedMouseEvent, true);
  $wnd.addEventListener('mouseover', dispatchCapturedMouseEvent, true);
  $wnd.addEventListener('mouseout', dispatchCapturedMouseEvent, true);
  $wnd.addEventListener('mousewheel', dispatchCapturedMouseEvent, true);
  $wnd.addEventListener('keydown', dispatchCapturedEvent, true);
  $wnd.addEventListener('keyup', dispatchCapturedEvent, true);
  $wnd.addEventListener('keypress', dispatchCapturedEvent, true);
}

function $insertChild(parent, toAdd, index){
  var count = 0, child = parent.firstChild, before = null;
  while (child) {
    if (child.nodeType == 1) {
      if (count == index) {
        before = child;
        break;
      }
      ++count;
    }
    child = child.nextSibling;
  }
  parent.insertBefore(toAdd, before);
}

function $releaseCaptureImpl(elem){
  if (elem === captureElem) {
    captureElem = null;
  }
}

var captureElem = null, dispatchCapturedEvent = null, dispatchCapturedMouseEvent = null, dispatchEvent_0 = null;
function $clinit_42(){
  $clinit_42 = nullMethod;
  historyListeners = $ArrayList(new ArrayList());
}

function decodeFragment(encodedFragment){
  return decodeURI(encodedFragment.replace('%23', '#'));
}

function fireHistoryChangedImpl(historyToken){
  var listener, listener$array, listener$index, listener$max, listenersToInvoke;
  listenersToInvoke = dynamicCast($toArray(historyListeners, initDim(_3Lcom_google_gwt_user_client_HistoryListener_2_classLit, 83, 25, historyListeners.size, 0)), 8);
  for (listener$array = listenersToInvoke , listener$index = 0 , listener$max = listener$array.length; listener$index < listener$max; ++listener$index) {
    listener = listener$array[listener$index];
    $onHistoryChanged(listener, historyToken);
  }
}

function newItemOnEvent(historyToken){
  historyToken = historyToken == null?'':historyToken;
  if (!$equals_0(historyToken, ($clinit_42() , $wnd.__gwt_historyToken || ''))) {
    $wnd.__gwt_historyToken = historyToken;
    fireHistoryChangedImpl(historyToken);
  }
}

function HistoryImpl(){
}

_ = HistoryImpl.prototype = new Object_0();
_.decodeFragment = decodeFragment;
_.newItemOnEvent = newItemOnEvent;
_.typeId$ = 0;
var historyListeners;
function $clinit_41(){
  $clinit_41 = nullMethod;
  $clinit_42();
}

function $init(this$static){
  var token_0 = '';
  var hash_0 = $wnd.location.hash;
  if (hash_0.length > 0) {
    token_0 = this$static.decodeFragment(hash_0.substring(1));
  }
  $wnd.__gwt_historyToken = token_0;
  var historyImpl = this$static;
  $wnd.__checkHistory = function(){
    $wnd.setTimeout($wnd.__checkHistory, 250);
    var token = '', hash = $wnd.location.hash;
    if (hash.length > 0) {
      token = historyImpl.decodeFragment(hash.substring(1));
    }
    historyImpl.newItemOnEvent(token);
  }
  ;
  $wnd.__checkHistory();
  return true;
}

function HistoryImplStandard(){
}

_ = HistoryImplStandard.prototype = new HistoryImpl();
_.typeId$ = 0;
function getBodyElement(){
  if (body == null) {
    body = $doc.compatMode == 'CSS1Compat' && opera.version() >= 9.5?$doc.documentElement:$doc.body;
  }
  return body;
}

var body = null;
function $replaceElement(this$static, elem){
  if (this$static.element) {
    $replaceNode(this$static.element, elem);
  }
  this$static.element = elem;
}

function $replaceNode(node, newNode){
  var p = node.parentNode;
  if (!p) {
    return;
  }
  p.insertBefore(newNode, node);
  p.removeChild(node);
}

function $setElement(this$static, elem){
  this$static.element = elem;
}

function $setTitle(this$static, title){
  if (title == null || title.length == 0) {
    this$static.element.removeAttribute('title');
  }
   else {
    this$static.element.setAttribute('title', title);
  }
}

function getStylePrimaryName(elem){
  var fullClassName, spaceIdx;
  fullClassName = elem['className'] == null?null:String(elem['className']);
  spaceIdx = fullClassName.indexOf(fromCodePoint(32));
  if (spaceIdx >= 0) {
    return fullClassName.substr(0, spaceIdx - 0);
  }
  return fullClassName;
}

function setStyleName(elem, style, add){
  var begin, end, idx, last, lastPos, newClassName, oldStyle;
  if (!elem) {
    throw new RuntimeException();
  }
  style = $trim(style);
  if (style.length == 0) {
    throw new IllegalArgumentException();
  }
  oldStyle = elem['className'] == null?null:String(elem['className']);
  idx = oldStyle.indexOf(style);
  while (idx != -1) {
    if (idx == 0 || oldStyle.charCodeAt(idx - 1) == 32) {
      last = idx + style.length;
      lastPos = oldStyle.length;
      if (last == lastPos || last < lastPos && oldStyle.charCodeAt(last) == 32) {
        break;
      }
    }
    idx = oldStyle.indexOf(style, idx + 1);
  }
  if (add) {
    if (idx == -1) {
      if (oldStyle.length > 0) {
        oldStyle += ' ';
      }
      elem['className'] = oldStyle + style;
    }
  }
   else {
    if (idx != -1) {
      begin = $trim(oldStyle.substr(0, idx - 0));
      end = $trim($substring(oldStyle, idx + style.length));
      if (begin.length == 0) {
        newClassName = end;
      }
       else if (end.length == 0) {
        newClassName = begin;
      }
       else {
        newClassName = begin + ' ' + end;
      }
      elem['className'] = newClassName;
    }
  }
}

function UIObject(){
}

_ = UIObject.prototype = new Object_0();
_.typeId$ = 12;
_.element = null;
function $onAttach(this$static){
  if (this$static.isAttached()) {
    throw new IllegalStateException();
  }
  this$static.attached_0 = true;
  this$static.element.__listener = this$static;
  this$static.doAttachChildren();
  this$static.onLoad();
}

function $onDetach(this$static){
  if (!this$static.isAttached()) {
    throw new IllegalStateException();
  }
  try {
    this$static.onUnload();
  }
   finally {
    this$static.doDetachChildren();
    this$static.element.__listener = null;
    this$static.attached_0 = false;
  }
}

function $removeFromParent(this$static){
  if (instanceOf(this$static.parent, 13)) {
    dynamicCast(this$static.parent, 13).remove(this$static);
  }
   else if (this$static.parent) {
    throw new IllegalStateException();
  }
}

function $replaceElement_0(this$static, elem){
  if (this$static.attached_0) {
    this$static.element.__listener = null;
  }
  $replaceElement(this$static, elem);
  if (this$static.attached_0) {
    this$static.element.__listener = this$static;
  }
}

function $setParent(this$static, parent){
  var oldParent;
  oldParent = this$static.parent;
  if (!parent) {
    if (!!oldParent && oldParent.isAttached()) {
      this$static.onDetach();
    }
    this$static.parent = null;
  }
   else {
    if (oldParent) {
      throw new IllegalStateException();
    }
    this$static.parent = parent;
    if (parent.isAttached()) {
      this$static.onAttach();
    }
  }
}

function doAttachChildren_0(){
}

function doDetachChildren_0(){
}

function isAttached_0(){
  return this.attached_0;
}

function onAttach_0(){
  $onAttach(this);
}

function onBrowserEvent_5(event_0){
}

function onDetach_0(){
  $onDetach(this);
}

function onLoad_0(){
}

function onUnload_0(){
}

function Widget(){
}

_ = Widget.prototype = new UIObject();
_.doAttachChildren = doAttachChildren_0;
_.doDetachChildren = doDetachChildren_0;
_.isAttached = isAttached_0;
_.onAttach = onAttach_0;
_.onBrowserEvent = onBrowserEvent_5;
_.onDetach = onDetach_0;
_.onLoad = onLoad_0;
_.onUnload = onUnload_0;
_.typeId$ = 13;
_.attached_0 = false;
_.parent = null;
function doAttachChildren(){
  var child, it;
  for (it = this.iterator_0(); it.hasNext();) {
    child = dynamicCast(it.next_0(), 11);
    child.onAttach();
  }
}

function doDetachChildren(){
  var child, it;
  for (it = this.iterator_0(); it.hasNext();) {
    child = dynamicCast(it.next_0(), 11);
    child.onDetach();
  }
}

function onLoad(){
}

function onUnload(){
}

function Panel(){
}

_ = Panel.prototype = new Widget();
_.doAttachChildren = doAttachChildren;
_.doDetachChildren = doDetachChildren;
_.onLoad = onLoad;
_.onUnload = onUnload;
_.typeId$ = 14;
function $add_0(this$static, child, container){
  $removeFromParent(child);
  $add_1(this$static.children, child);
  container.appendChild(child.element);
  $setParent(child, this$static);
}

function $remove_1(this$static, w){
  var elem;
  if (w.parent != this$static) {
    return false;
  }
  $setParent(w, null);
  elem = w.element;
  $getParentElement(elem).removeChild(elem);
  $remove_5(this$static.children, w);
  return true;
}

function iterator(){
  return $WidgetCollection$WidgetIterator(new WidgetCollection$WidgetIterator(), this.children);
}

function remove_0(w){
  return $remove_1(this, w);
}

function ComplexPanel(){
}

_ = ComplexPanel.prototype = new Panel();
_.iterator_0 = iterator;
_.remove = remove_0;
_.typeId$ = 15;
function $add(this$static, w){
  $add_0(this$static, w, this$static.element);
}

function $remove_0(this$static, w){
  var removed;
  removed = $remove_1(this$static, w);
  if (removed) {
    changeToStaticPositioning(w.element);
  }
  return removed;
}

function changeToStaticPositioning(elem){
  elem.style['left'] = '';
  elem.style['top'] = '';
  elem.style['position'] = '';
}

function remove(w){
  return $remove_0(this, w);
}

function AbsolutePanel(){
}

_ = AbsolutePanel.prototype = new ComplexPanel();
_.remove = remove;
_.typeId$ = 16;
function AbstractImagePrototype(){
}

_ = AbstractImagePrototype.prototype = new Object_0();
_.typeId$ = 0;
function $advanceToFind(iter, o){
  var t;
  while (iter.hasNext()) {
    t = iter.next_0();
    if (o == null?t == null:equals__devirtual$(o, t)) {
      return iter;
    }
  }
  return null;
}

function add_1(o){
  throw new UnsupportedOperationException();
}

function contains(o){
  var iter;
  iter = $advanceToFind(this.iterator_0(), o);
  return !!iter;
}

function AbstractCollection(){
}

_ = AbstractCollection.prototype = new Object_0();
_.add_2 = add_1;
_.contains = contains;
_.typeId$ = 0;
function add_3(obj){
  this.add_0(this.size_0(), obj);
  return true;
}

function add_2(index, element){
  throw new UnsupportedOperationException();
}

function checkIndex(index, size){
  if (index < 0 || index >= size) {
    indexOutOfBounds(index, size);
  }
}

function equals_2(o){
  var elem, elemOther, iter, iterOther, other;
  if ((o == null?null:o) === (this == null?null:this)) {
    return true;
  }
  if (!(o != null && canCast(o.typeId$, 21))) {
    return false;
  }
  other = dynamicCast(o, 21);
  if (this.size_0() != other.size_0()) {
    return false;
  }
  iter = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), this);
  iterOther = other.iterator_0();
  while (iter.i < iter.this$0.size_0()) {
    elem = $next_1(iter);
    elemOther = $next_1(iterOther);
    if (!(elem == null?elemOther == null:equals__devirtual$(elem, elemOther))) {
      return false;
    }
  }
  return true;
}

function hashCode_3(){
  var iter, k, obj;
  k = 1;
  iter = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), this);
  while (iter.i < iter.this$0.size_0()) {
    obj = $next_1(iter);
    k = 31 * k + (obj == null?0:hashCode__devirtual$(obj));
    k = ~~k;
  }
  return k;
}

function indexOutOfBounds(index, size){
  throw $IndexOutOfBoundsException(new IndexOutOfBoundsException(), 'Index: ' + index + ', Size: ' + size);
}

function iterator_3(){
  return $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), this);
}

function AbstractList(){
}

_ = AbstractList.prototype = new AbstractCollection();
_.add_2 = add_3;
_.add_0 = add_2;
_.equals$ = equals_2;
_.hashCode$ = hashCode_3;
_.iterator_0 = iterator_3;
_.typeId$ = 17;
function $ArrayList(this$static){
  this$static.array = initDim(_3Ljava_lang_Object_2_classLit, 0, 0, 0, 0);
  this$static.size = 0;
  return this$static;
}

function $add_3(this$static, o){
  setCheck(this$static.array, this$static.size++, o);
  return true;
}

function $get_1(this$static, index){
  checkIndex(index, this$static.size);
  return this$static.array[index];
}

function $indexOf_2(this$static, o, index){
  for (; index < this$static.size; ++index) {
    if (equalsWithNullCheck(o, this$static.array[index])) {
      return index;
    }
  }
  return -1;
}

function $remove_6(this$static, index){
  var previous;
  previous = (checkIndex(index, this$static.size) , this$static.array[index]);
  this$static.array.splice(index, 1);
  --this$static.size;
  return previous;
}

function $remove_7(this$static, o){
  var i;
  i = $indexOf_2(this$static, o, 0);
  if (i == -1) {
    return false;
  }
  $remove_6(this$static, i);
  return true;
}

function $set(this$static, index, o){
  var previous;
  previous = (checkIndex(index, this$static.size) , this$static.array[index]);
  setCheck(this$static.array, index, o);
  return previous;
}

function $toArray(this$static, out){
  var i, a, result;
  if (out.length < this$static.size) {
    out = (a = out , result = createFromSeed(0, this$static.size) , initValues(a.arrayClass$, a.typeId$, a.queryId$, result) , result);
  }
  for (i = 0; i < this$static.size; ++i) {
    setCheck(out, i, this$static.array[i]);
  }
  if (out.length > this$static.size) {
    setCheck(out, this$static.size, null);
  }
  return out;
}

function add_5(o){
  return setCheck(this.array, this.size++, o) , true;
}

function add_4(index, o){
  if (index < 0 || index > this.size) {
    indexOutOfBounds(index, this.size);
  }
  this.array.splice(index, 0, o);
  ++this.size;
}

function contains_2(o){
  return $indexOf_2(this, o, 0) != -1;
}

function get_2(index){
  return checkIndex(index, this.size) , this.array[index];
}

function size_2(){
  return this.size;
}

function ArrayList(){
}

_ = ArrayList.prototype = new AbstractList();
_.add_2 = add_5;
_.add_0 = add_4;
_.contains = contains_2;
_.get = get_2;
_.size_0 = size_2;
_.typeId$ = 18;
_.array = null;
_.size = 0;
function $ChangeListenerCollection(this$static){
  this$static.array = initDim(_3Ljava_lang_Object_2_classLit, 0, 0, 0, 0);
  this$static.size = 0;
  return this$static;
}

function $fireChange(this$static, sender){
  var listener, listener$iterator;
  for (listener$iterator = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), this$static); listener$iterator.i < listener$iterator.this$0.size_0();) {
    listener = dynamicCast($next_1(listener$iterator), 9);
    listener.onChange(sender);
  }
}

function ChangeListenerCollection(){
}

_ = ChangeListenerCollection.prototype = new ArrayList();
_.typeId$ = 19;
function $ClickListenerCollection(this$static){
  this$static.array = initDim(_3Ljava_lang_Object_2_classLit, 0, 0, 0, 0);
  this$static.size = 0;
  return this$static;
}

function $fireClick(this$static){
  var listener, listener$iterator;
  for (listener$iterator = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), this$static); listener$iterator.i < listener$iterator.this$0.size_0();) {
    listener = dynamicCast($next_1(listener$iterator), 10);
    $onClick(listener);
  }
}

function ClickListenerCollection(){
}

_ = ClickListenerCollection.prototype = new ArrayList();
_.typeId$ = 20;
function $initWidget(this$static, widget){
  if (this$static.widget) {
    throw new IllegalStateException();
  }
  $removeFromParent(widget);
  $setElement(this$static, widget.element);
  this$static.widget = widget;
  $setParent(widget, this$static);
}

function isAttached(){
  if (this.widget) {
    return this.widget.attached_0;
  }
  return false;
}

function onAttach(){
  $onAttach(this.widget);
  this.element.__listener = this;
}

function onBrowserEvent(event_0){
  this.widget.onBrowserEvent(event_0);
}

function onDetach(){
  $onDetach(this.widget);
}

function Composite(){
}

_ = Composite.prototype = new Widget();
_.isAttached = isAttached;
_.onAttach = onAttach;
_.onBrowserEvent = onBrowserEvent;
_.onDetach = onDetach;
_.typeId$ = 21;
_.widget = null;
function $checkCellBounds(this$static, row, column){
  var cellSize;
  $checkRowBounds(this$static, row);
  if (column < 0) {
    throw $IndexOutOfBoundsException(new IndexOutOfBoundsException(), 'Column ' + column + ' must be non-negative: ' + column);
  }
  cellSize = ($checkRowBounds(this$static, row) , this$static.bodyElem.rows[row].cells.length);
  if (cellSize <= column) {
    throw $IndexOutOfBoundsException(new IndexOutOfBoundsException(), 'Column index: ' + column + ', Column size: ' + ($checkRowBounds(this$static, row) , this$static.bodyElem.rows[row].cells.length));
  }
}

function $checkRowBounds(this$static, row){
  var rowSize;
  rowSize = this$static.bodyElem.rows.length;
  if (row >= rowSize || row < 0) {
    throw $IndexOutOfBoundsException(new IndexOutOfBoundsException(), 'Row index: ' + row + ', Row size: ' + rowSize);
  }
}

function $insertRow(this$static, beforeRow){
  var tr;
  if (beforeRow != this$static.bodyElem.rows.length) {
    $checkRowBounds(this$static, beforeRow);
  }
  tr = $doc.createElement('tr');
  $insertChild(this$static.bodyElem, tr, beforeRow);
  return beforeRow;
}

function $internalClearCell(this$static, td, clearInnerHTML){
  var maybeChild, widget;
  maybeChild = $getFirstChildElement(td);
  widget = null;
  if (maybeChild) {
    widget = $getWidget(this$static.widgetMap, maybeChild);
  }
  if (widget) {
    $remove_2(this$static, widget);
    return true;
  }
   else {
    if (clearInnerHTML) {
      td.innerHTML = '';
    }
    return false;
  }
}

function $remove_2(this$static, widget){
  var elem;
  if (widget.parent != this$static) {
    return false;
  }
  $setParent(widget, null);
  elem = widget.element;
  $getParentElement(elem).removeChild(elem);
  $removeWidgetByElement(this$static.widgetMap, elem);
  return true;
}

function $setColumnFormatter(this$static, formatter){
  this$static.columnFormatter = formatter;
  $prepareColumnGroup(this$static.columnFormatter);
}

function $setHTML(this$static, row, column, html){
  var td_0, td;
  $prepareCell(this$static, row, column);
  td_0 = (td = this$static.cellFormatter.this$0.bodyElem.rows[row].cells[column] , $internalClearCell(this$static, td, html == null) , td);
  if (html != null) {
    td_0.innerHTML = html || '';
  }
}

function $setWidget(this$static, row, column, widget){
  var td_0, td;
  $prepareCell(this$static, row, column);
  if (widget) {
    $removeFromParent(widget);
    td_0 = (td = this$static.cellFormatter.this$0.bodyElem.rows[row].cells[column] , $internalClearCell(this$static, td, true) , td);
    $putWidget(this$static.widgetMap, widget);
    td_0.appendChild(widget.element);
    $setParent(widget, this$static);
  }
}

function iterator_0(){
  return $HTMLTable$WidgetMapper$1(new HTMLTable$WidgetMapper$1(), this.widgetMap);
}

function onBrowserEvent_2(event_0){
  $eventGetTypeInt(event_0);
}

function remove_1(widget){
  return $remove_2(this, widget);
}

function HTMLTable(){
}

_ = HTMLTable.prototype = new Panel();
_.iterator_0 = iterator_0;
_.onBrowserEvent = onBrowserEvent_2;
_.remove = remove_1;
_.typeId$ = 22;
_.bodyElem = null;
_.cellFormatter = null;
_.columnFormatter = null;
_.rowFormatter = null;
_.tableElem = null;
function $FlexTable(this$static){
  this$static.widgetMap = $HTMLTable$WidgetMapper(new HTMLTable$WidgetMapper());
  this$static.tableElem = $doc.createElement('table');
  this$static.bodyElem = $doc.createElement('tbody');
  this$static.tableElem.appendChild(this$static.bodyElem);
  this$static.element = this$static.tableElem;
  this$static.cellFormatter = $FlexTable$FlexCellFormatter(new FlexTable$FlexCellFormatter(), this$static);
  this$static.rowFormatter = $HTMLTable$RowFormatter(new HTMLTable$RowFormatter(), this$static);
  $setColumnFormatter(this$static, $HTMLTable$ColumnFormatter(new HTMLTable$ColumnFormatter(), this$static));
  return this$static;
}

function $prepareCell(this$static, row, column){
  var cellCount, required;
  $prepareRow(this$static, row);
  if (column < 0) {
    throw $IndexOutOfBoundsException(new IndexOutOfBoundsException(), 'Cannot create a column with a negative index: ' + column);
  }
  cellCount = ($checkRowBounds(this$static, row) , this$static.bodyElem.rows[row].cells.length);
  required = column + 1 - cellCount;
  if (required > 0) {
    addCells(this$static.bodyElem, row, required);
  }
}

function $prepareRow(this$static, row){
  var i, rowCount;
  if (row < 0) {
    throw $IndexOutOfBoundsException(new IndexOutOfBoundsException(), 'Cannot create a row with a negative index: ' + row);
  }
  rowCount = this$static.bodyElem.rows.length;
  for (i = rowCount; i <= row; ++i) {
    $insertRow(this$static, i);
  }
}

function addCells(table, row, num){
  var rowElem = table.rows[row];
  for (var i = 0; i < num; i++) {
    var cell = $doc.createElement('td');
    rowElem.appendChild(cell);
  }
}

function FlexTable(){
}

_ = FlexTable.prototype = new HTMLTable();
_.typeId$ = 23;
function $getElement(this$static, row, column){
  $checkCellBounds(this$static.this$0, row, column);
  return this$static.this$0.bodyElem.rows[row].cells[column];
}

function HTMLTable$CellFormatter(){
}

_ = HTMLTable$CellFormatter.prototype = new Object_0();
_.typeId$ = 0;
_.this$0 = null;
function $FlexTable$FlexCellFormatter(this$static, this$0){
  this$static.this$0 = this$0;
  return this$static;
}

function $setColSpan_0(this$static, row, column, colSpan){
  ($prepareCell(this$static.this$0, row, column) , this$static.this$0.bodyElem.rows[row].cells[column])['colSpan'] = colSpan;
}

function FlexTable$FlexCellFormatter(){
}

_ = FlexTable$FlexCellFormatter.prototype = new HTMLTable$CellFormatter();
_.typeId$ = 0;
function $FlowPanel(this$static){
  this$static.children = $WidgetCollection(new WidgetCollection());
  this$static.element = $doc.createElement('div');
  return this$static;
}

function add_0(w){
  $add_0(this, w, this.element);
}

function FlowPanel(){
}

_ = FlowPanel.prototype = new ComplexPanel();
_.add_1 = add_0;
_.typeId$ = 24;
function $SimplePanel(this$static){
  this$static.element = $doc.createElement('div');
  return this$static;
}

function $SimplePanel_0(this$static, elem){
  this$static.element = elem;
  return this$static;
}

function $remove_3(this$static, w){
  if (this$static.widget != w) {
    return false;
  }
  $setParent(w, null);
  this$static.getContainerElement().removeChild(w.element);
  this$static.widget = null;
  return true;
}

function $setWidget_0(this$static, w){
  if (w == this$static.widget) {
    return;
  }
  if (w) {
    $removeFromParent(w);
  }
  if (this$static.widget) {
    $remove_3(this$static, this$static.widget);
  }
  this$static.widget = w;
  if (w) {
    this$static.getContainerElement().appendChild(this$static.widget.element);
    $setParent(w, this$static);
  }
}

function getContainerElement(){
  return this.element;
}

function iterator_1(){
  return $SimplePanel$1(new SimplePanel$1(), this);
}

function remove_2(w){
  return $remove_3(this, w);
}

function SimplePanel(){
}

_ = SimplePanel.prototype = new Panel();
_.getContainerElement = getContainerElement;
_.iterator_0 = iterator_1;
_.remove = remove_2;
_.typeId$ = 25;
_.widget = null;
function $setFocus(this$static, focused){
  if (focused) {
    this$static.element.focus();
  }
   else {
    this$static.element.blur();
  }
}

function onBrowserEvent_0(event_0){
  $eventGetTypeInt(event_0);
}

function FocusPanel(){
}

_ = FocusPanel.prototype = new SimplePanel();
_.onBrowserEvent = onBrowserEvent_0;
_.typeId$ = 26;
function $FocusWidget(this$static, elem){
  this$static.element = elem;
  this$static.tabIndex_0 = 0;
  this$static.element.tabIndex = 0;
  return this$static;
}

function $addClickListener(this$static, listener){
  if (!this$static.clickListeners) {
    this$static.clickListeners = $ClickListenerCollection(new ClickListenerCollection());
    sinkEvents(this$static.element, 1 | (this$static.element.__eventBits || 0));
  }
  $add_3(this$static.clickListeners, listener);
}

function $onBrowserEvent(this$static, event_0){
  if ($eventGetTypeInt(event_0) == 1) {
    if (this$static.clickListeners) {
      $fireClick(this$static.clickListeners);
    }
  }
}

function $setFocus_0(this$static, focused){
  if (focused) {
    this$static.element.focus();
  }
   else {
    this$static.element.blur();
  }
}

function onBrowserEvent_1(event_0){
  $onBrowserEvent(this, event_0);
}

function FocusWidget(){
}

_ = FocusWidget.prototype = new Widget();
_.onBrowserEvent = onBrowserEvent_1;
_.typeId$ = 27;
_.clickListeners = null;
function $Label(this$static){
  this$static.element = $doc.createElement('div');
  this$static.element['className'] = 'gwt-Label';
  return this$static;
}

function $Label_1(this$static, text){
  this$static.element = $doc.createElement('div');
  this$static.element['className'] = 'gwt-Label';
  $setInnerText(this$static.element, text);
  return this$static;
}

function $Label_0(this$static, element){
  this$static.element = element;
  return this$static;
}

function onBrowserEvent_4(event_0){
  $eventGetTypeInt(event_0);
}

function Label(){
}

_ = Label.prototype = new Widget();
_.onBrowserEvent = onBrowserEvent_4;
_.typeId$ = 28;
function $HTML_0(this$static, html){
  $Label_0(this$static, $doc.createElement('div'));
  this$static.element['className'] = 'gwt-HTML';
  this$static.element.innerHTML = html || '';
  return this$static;
}

function $HTML(this$static, element){
  this$static.element = element;
  return this$static;
}

function HTML(){
}

_ = HTML.prototype = new Label();
_.typeId$ = 29;
function $HTMLTable$ColumnFormatter(this$static, this$0){
  this$static.this$0 = this$0;
  return this$static;
}

function $prepareColumnGroup(this$static){
  if (!this$static.columnGroup) {
    this$static.columnGroup = $doc.createElement('colgroup');
    $insertChild(this$static.this$0.tableElem, this$static.columnGroup, 0);
    this$static.columnGroup.appendChild($doc.createElement('col'));
  }
}

function HTMLTable$ColumnFormatter(){
}

_ = HTMLTable$ColumnFormatter.prototype = new Object_0();
_.typeId$ = 0;
_.columnGroup = null;
_.this$0 = null;
function $HTMLTable$RowFormatter(this$static, this$0){
  this$static.this$0 = this$0;
  return this$static;
}

function $setVerticalAlign(this$static, row, align){
  ($prepareRow(this$static.this$0, row) , this$static.this$0.bodyElem.rows[row]).style['verticalAlign'] = align.verticalAlignString;
}

function HTMLTable$RowFormatter(){
}

_ = HTMLTable$RowFormatter.prototype = new Object_0();
_.typeId$ = 0;
_.this$0 = null;
function $HTMLTable$WidgetMapper(this$static){
  this$static.widgetList = $ArrayList(new ArrayList());
  return this$static;
}

function $getWidget(this$static, elem){
  var index_0, index;
  index_0 = (index = elem['__widgetID'] , index == null?-1:index);
  if (index_0 < 0) {
    return null;
  }
  return dynamicCast($get_1(this$static.widgetList, index_0), 11);
}

function $putWidget(this$static, widget){
  var index;
  if (!this$static.freeList) {
    index = this$static.widgetList.size;
    $add_3(this$static.widgetList, widget);
  }
   else {
    index = this$static.freeList.index;
    $set(this$static.widgetList, index, widget);
    this$static.freeList = this$static.freeList.next;
  }
  widget.element['__widgetID'] = index;
}

function $removeWidgetByElement(this$static, elem){
  var index_0, index;
  index_0 = (index = elem['__widgetID'] , index == null?-1:index);
  elem['__widgetID'] = null;
  $set(this$static.widgetList, index_0, null);
  this$static.freeList = $HTMLTable$WidgetMapper$FreeNode(new HTMLTable$WidgetMapper$FreeNode(), index_0, this$static.freeList);
}

function HTMLTable$WidgetMapper(){
}

_ = HTMLTable$WidgetMapper.prototype = new Object_0();
_.typeId$ = 0;
_.freeList = null;
function $HTMLTable$WidgetMapper$1(this$static, this$1){
  this$static.this$1 = this$1;
  $findNext(this$static);
  return this$static;
}

function $findNext(this$static){
  while (++this$static.nextIndex < this$static.this$1.widgetList.size) {
    if ($get_1(this$static.this$1.widgetList, this$static.nextIndex) != null) {
      return;
    }
  }
}

function hasNext_0(){
  return this.nextIndex < this.this$1.widgetList.size;
}

function next_1(){
  var result;
  if (this.nextIndex >= this.this$1.widgetList.size) {
    throw new NoSuchElementException();
  }
  result = dynamicCast($get_1(this.this$1.widgetList, this.nextIndex), 11);
  $findNext(this);
  return result;
}

function HTMLTable$WidgetMapper$1(){
}

_ = HTMLTable$WidgetMapper$1.prototype = new Object_0();
_.hasNext = hasNext_0;
_.next_0 = next_1;
_.typeId$ = 0;
_.nextIndex = -1;
_.this$1 = null;
function $HTMLTable$WidgetMapper$FreeNode(this$static, index, next){
  this$static.index = index;
  this$static.next = next;
  return this$static;
}

function HTMLTable$WidgetMapper$FreeNode(){
}

_ = HTMLTable$WidgetMapper$FreeNode.prototype = new Object_0();
_.typeId$ = 0;
_.index = 0;
_.next = null;
function $clinit_71(){
  $clinit_71 = nullMethod;
  $HasVerticalAlignment$VerticalAlignmentConstant(new HasVerticalAlignment$VerticalAlignmentConstant(), 'bottom');
  ALIGN_MIDDLE = $HasVerticalAlignment$VerticalAlignmentConstant(new HasVerticalAlignment$VerticalAlignmentConstant(), 'middle');
  $HasVerticalAlignment$VerticalAlignmentConstant(new HasVerticalAlignment$VerticalAlignmentConstant(), 'top');
}

var ALIGN_MIDDLE;
function $HasVerticalAlignment$VerticalAlignmentConstant(this$static, verticalAlignString){
  this$static.verticalAlignString = verticalAlignString;
  return this$static;
}

function HasVerticalAlignment$VerticalAlignmentConstant(){
}

_ = HasVerticalAlignment$VerticalAlignmentConstant.prototype = new Object_0();
_.typeId$ = 0;
_.verticalAlignString = null;
function $clinit_79(){
  $clinit_79 = nullMethod;
  $clearImpl(new HashMap());
}

function $Image(this$static){
  $clinit_79();
  this$static.state = $Image$UnclippedState(new Image$UnclippedState(), this$static);
  this$static.element['className'] = 'gwt-Image';
  return this$static;
}

function $setUrlAndVisibleRect(this$static, url, left, top, width, height){
  this$static.state.setUrlAndVisibleRect(this$static, url, left, top, width, height);
}

function onBrowserEvent_3(event_0){
  $eventGetTypeInt(event_0);
}

function Image_0(){
}

_ = Image_0.prototype = new Widget();
_.onBrowserEvent = onBrowserEvent_3;
_.typeId$ = 30;
_.state = null;
function Image$State(){
}

_ = Image$State.prototype = new Object_0();
_.typeId$ = 0;
function $Image$ClippedState(this$static, image, url, left, top, width, height){
  var tmp, clippedImgHtml, style;
  this$static.left = left;
  this$static.top = top;
  this$static.width = width;
  this$static.height = height;
  this$static.url = url;
  $replaceElement_0(image, (tmp = $doc.createElement('span') , (tmp.innerHTML = (style = 'width: ' + width + 'px; height: ' + height + 'px; background: url(' + url + ') no-repeat ' + (-left + 'px ') + (-top + 'px') , clippedImgHtml = "<img src='" + $moduleBase + "clear.cache.gif' style='" + style + "' border='0'>" , clippedImgHtml) || '' , undefined) , $getFirstChildElement(tmp)));
  sinkEvents(image.element, 131197 | (image.element.__eventBits || 0));
  addCommand(new Image$ClippedState$1());
  return this$static;
}

function setUrlAndVisibleRect(image, url, left, top, width, height){
  if (!$equals_0(this.url, url) || this.left != left || this.top != top || this.width != width || this.height != height) {
    this.url = url;
    this.left = left;
    this.top = top;
    this.width = width;
    this.height = height;
    $adjust(image.element, url, left, top, width, height);
    addCommand(new Image$ClippedState$1());
  }
}

function Image$ClippedState(){
}

_ = Image$ClippedState.prototype = new Image$State();
_.setUrlAndVisibleRect = setUrlAndVisibleRect;
_.typeId$ = 0;
_.height = 0;
_.left = 0;
_.top = 0;
_.url = null;
_.width = 0;
function Image$ClippedState$1(){
}

_ = Image$ClippedState$1.prototype = new Object_0();
_.typeId$ = 31;
function $Image$UnclippedState(this$static, image){
  $replaceElement_0(image, $doc.createElement('img'));
  sinkEvents(image.element, 229501 | (image.element.__eventBits || 0));
  return this$static;
}

function setUrlAndVisibleRect_0(image, url, left, top, width, height){
  image.state = $Image$ClippedState(new Image$ClippedState(), image, url, left, top, width, height);
}

function Image$UnclippedState(){
}

_ = Image$UnclippedState.prototype = new Image$State();
_.setUrlAndVisibleRect = setUrlAndVisibleRect_0;
_.typeId$ = 0;
function $clinit_85(){
  $clinit_85 = nullMethod;
  rootPanels = $HashMap(new HashMap());
  widgetsToDetach = $HashSet(new HashSet());
}

function $RootPanel(this$static, elem){
  $clinit_85();
  this$static.children = $WidgetCollection(new WidgetCollection());
  this$static.element = elem;
  $onAttach(this$static);
  return this$static;
}

function detachWidgets(){
  var outerIter, entry;
  $clinit_85();
  var widget, widget$iterator;
  for (widget$iterator = (outerIter = $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator(), $keySet(widgetsToDetach.map).val$entrySet.this$0) , $AbstractMap$1$1(new AbstractMap$1$1(), outerIter)); widget$iterator.val$outerIter.hasNext();) {
    widget = dynamicCast((entry = widget$iterator.val$outerIter.next_0() , entry.getKey()), 11);
    if (widget.isAttached()) {
      widget.onDetach();
    }
  }
}

function get_0(id){
  $clinit_85();
  var rp;
  rp = dynamicCast($get_0(rootPanels, id), 12);
  if (rp) {
    return rp;
  }
  if (rootPanels.size == 0) {
    addWindowCloseListener(new RootPanel$1());
  }
  rp = $RootPanel$DefaultRootPanel(new RootPanel$DefaultRootPanel());
  $put(rootPanels, id, rp);
  $add_4(widgetsToDetach, rp);
  return rp;
}

function RootPanel(){
}

_ = RootPanel.prototype = new AbsolutePanel();
_.typeId$ = 32;
var rootPanels, widgetsToDetach;
function onWindowClosed_0(){
  detachWidgets();
}

function onWindowClosing_0(){
  return null;
}

function RootPanel$1(){
}

_ = RootPanel$1.prototype = new Object_0();
_.onWindowClosed = onWindowClosed_0;
_.onWindowClosing = onWindowClosing_0;
_.typeId$ = 33;
function $clinit_84(){
  $clinit_84 = nullMethod;
  $clinit_85();
}

function $RootPanel$DefaultRootPanel(this$static){
  $clinit_84();
  $RootPanel(this$static, $doc.body);
  return this$static;
}

function RootPanel$DefaultRootPanel(){
}

_ = RootPanel$DefaultRootPanel.prototype = new RootPanel();
_.typeId$ = 34;
function $SimplePanel$1(this$static, this$0){
  this$static.this$0 = this$0;
  this$static.hasElement = !!this$static.this$0.widget;
  return this$static;
}

function hasNext_1(){
  return this.hasElement;
}

function next_2(){
  if (!this.hasElement || !this.this$0.widget) {
    throw new NoSuchElementException();
  }
  this.hasElement = false;
  return this.this$0.widget;
}

function SimplePanel$1(){
}

_ = SimplePanel$1.prototype = new Object_0();
_.hasNext = hasNext_1;
_.next_0 = next_2;
_.typeId$ = 0;
_.this$0 = null;
function $WidgetCollection(this$static){
  this$static.array = initDim(_3Lcom_google_gwt_user_client_ui_Widget_2_classLit, 0, 11, 4, 0);
  return this$static;
}

function $add_1(this$static, w){
  $insert(this$static, w, this$static.size);
}

function $get(this$static, index){
  if (index < 0 || index >= this$static.size) {
    throw new IndexOutOfBoundsException();
  }
  return this$static.array[index];
}

function $indexOf(this$static, w){
  var i;
  for (i = 0; i < this$static.size; ++i) {
    if (this$static.array[i] == w) {
      return i;
    }
  }
  return -1;
}

function $insert(this$static, w, beforeIndex){
  var i, newArray;
  if (beforeIndex < 0 || beforeIndex > this$static.size) {
    throw new IndexOutOfBoundsException();
  }
  if (this$static.size == this$static.array.length) {
    newArray = initDim(_3Lcom_google_gwt_user_client_ui_Widget_2_classLit, 0, 11, this$static.array.length * 2, 0);
    for (i = 0; i < this$static.array.length; ++i) {
      setCheck(newArray, i, this$static.array[i]);
    }
    this$static.array = newArray;
  }
  ++this$static.size;
  for (i = this$static.size - 1; i > beforeIndex; --i) {
    setCheck(this$static.array, i, this$static.array[i - 1]);
  }
  setCheck(this$static.array, beforeIndex, w);
}

function $remove_4(this$static, index){
  var i;
  if (index < 0 || index >= this$static.size) {
    throw new IndexOutOfBoundsException();
  }
  --this$static.size;
  for (i = index; i < this$static.size; ++i) {
    setCheck(this$static.array, i, this$static.array[i + 1]);
  }
  setCheck(this$static.array, this$static.size, null);
}

function $remove_5(this$static, w){
  var index;
  index = $indexOf(this$static, w);
  if (index == -1) {
    throw new NoSuchElementException();
  }
  $remove_4(this$static, index);
}

function WidgetCollection(){
}

_ = WidgetCollection.prototype = new Object_0();
_.typeId$ = 0;
_.array = null;
_.size = 0;
function $WidgetCollection$WidgetIterator(this$static, this$0){
  this$static.this$0 = this$0;
  return this$static;
}

function $next_0(this$static){
  if (this$static.index >= this$static.this$0.size) {
    throw new NoSuchElementException();
  }
  return this$static.this$0.array[++this$static.index];
}

function hasNext_2(){
  return this.index < this.this$0.size - 1;
}

function next_3(){
  return $next_0(this);
}

function WidgetCollection$WidgetIterator(){
}

_ = WidgetCollection$WidgetIterator.prototype = new Object_0();
_.hasNext = hasNext_2;
_.next_0 = next_3;
_.typeId$ = 0;
_.index = -1;
_.this$0 = null;
function $adjust(img, url, left, top, width, height){
  var style;
  style = 'url(' + url + ') no-repeat ' + (-left + 'px ') + (-top + 'px');
  img.style['background'] = style;
  img.style['width'] = width + 'px';
  img.style['height'] = height + 'px';
}

function $ClippedImagePrototype(this$static, url, left, top, width, height){
  this$static.url = url;
  this$static.left = left;
  this$static.top = top;
  this$static.width = width;
  this$static.height = height;
  return this$static;
}

function $applyTo(this$static, image){
  $setUrlAndVisibleRect(image, this$static.url, this$static.left, this$static.top, this$static.width, this$static.height);
}

function ClippedImagePrototype(){
}

_ = ClippedImagePrototype.prototype = new AbstractImagePrototype();
_.typeId$ = 0;
_.height = 0;
_.left = 0;
_.top = 0;
_.url = null;
_.width = 0;
function $ResizableWidgetCollection(this$static){
  $ResizableWidgetCollection_0(this$static, 400, true);
  return this$static;
}

function $ResizableWidgetCollection_0(this$static, resizeCheckDelay, resizeCheckingEnabled){
  this$static.resizeCheckTimer = $ResizableWidgetCollection$1(new ResizableWidgetCollection$1(), this$static);
  this$static.widgets = $HashMap(new HashMap());
  addWindowResizeListener(this$static);
  this$static.resizeCheckDelay = resizeCheckDelay;
  if (resizeCheckingEnabled) {
    $schedule(this$static.resizeCheckTimer, resizeCheckDelay);
  }
   else {
    this$static.resizeCheckingEnabled = false;
  }
  return this$static;
}

function $add_2(this$static, widget){
  $put(this$static.widgets, widget, $ResizableWidgetCollection$ResizableWidgetInfo(new ResizableWidgetCollection$ResizableWidgetInfo(), widget));
}

function $checkWidgetSize(this$static){
  var curHeight, curWidth, entry, entry$iterator, info, widget;
  for (entry$iterator = $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator(), $AbstractHashMap$EntrySet(new AbstractHashMap$EntrySet(), this$static.widgets).this$0); $hasNext_0(entry$iterator.iter);) {
    entry = dynamicCast($next_1(entry$iterator.iter), 18);
    widget = dynamicCast(entry.getKey(), 19);
    info = dynamicCast(entry.getValue(), 20);
    curWidth = parseInt(widget.element['clientWidth']) || 0;
    curHeight = parseInt(widget.element['clientHeight']) || 0;
    if ($setClientSize(info, curWidth, curHeight)) {
      if (curWidth > 0 && curHeight > 0 && widget.attached_0) {
        $onResize(widget, curWidth);
      }
    }
  }
}

function $onWindowResized(this$static){
  $checkWidgetSize(this$static);
}

function get_1(){
  if (!staticCollection) {
    staticCollection = $ResizableWidgetCollection(new ResizableWidgetCollection());
  }
  return staticCollection;
}

function ResizableWidgetCollection(){
}

_ = ResizableWidgetCollection.prototype = new Object_0();
_.typeId$ = 35;
_.resizeCheckDelay = 400;
_.resizeCheckingEnabled = true;
_.windowHeight = 0;
_.windowWidth = 0;
var staticCollection = null;
function $clinit_103(){
  $clinit_103 = nullMethod;
  $clinit_34();
}

function $ResizableWidgetCollection$1(this$static, this$0){
  $clinit_103();
  this$static.this$0 = this$0;
  return this$static;
}

function run_1(){
  if (this.this$0.windowHeight != getBodyElement().clientHeight || this.this$0.windowWidth != getBodyElement().clientWidth) {
    this.this$0.windowHeight = getBodyElement().clientHeight;
    this.this$0.windowWidth = getBodyElement().clientWidth;
    $schedule(this, this.this$0.resizeCheckDelay);
    return;
  }
  $checkWidgetSize(this.this$0);
  if (this.this$0.resizeCheckingEnabled) {
    $schedule(this, this.this$0.resizeCheckDelay);
  }
}

function ResizableWidgetCollection$1(){
}

_ = ResizableWidgetCollection$1.prototype = new Timer();
_.run = run_1;
_.typeId$ = 36;
_.this$0 = null;
function $ResizableWidgetCollection$ResizableWidgetInfo(this$static, widget){
  this$static.curWidth = parseInt(widget.element['clientWidth']) || 0;
  this$static.curHeight = parseInt(widget.element['clientHeight']) || 0;
  return this$static;
}

function $setClientSize(this$static, width, height){
  if (width != this$static.curWidth || height != this$static.curHeight) {
    this$static.curWidth = width;
    this$static.curHeight = height;
    return true;
  }
   else {
    return false;
  }
}

function ResizableWidgetCollection$ResizableWidgetInfo(){
}

_ = ResizableWidgetCollection$ResizableWidgetInfo.prototype = new Object_0();
_.typeId$ = 37;
_.curHeight = 0;
_.curWidth = 0;
function $SliderBar(this$static, minValue, maxValue){
  $SliderBar_0(this$static, minValue, maxValue, null, ($clinit_111() , new SliderBar_SliderBarImages_generatedBundle()));
  return this$static;
}

function $SliderBar_0(this$static, minValue, maxValue, labelFormatter){
  var knobElement, e;
  this$static.element = (e = $doc.createElement('DIV') , e.tabIndex = 0 , e);
  sinkEvents(this$static.element, 138237 | (this$static.element.__eventBits || 0));
  this$static.knobImage = $Image(new Image_0());
  this$static.keyTimer = $SliderBar$KeyTimer(new SliderBar$KeyTimer(), this$static);
  this$static.labelElements = $ArrayList(new ArrayList());
  this$static.tickElements = $ArrayList(new ArrayList());
  this$static.minValue = minValue;
  this$static.maxValue = maxValue;
  this$static.labelFormatter = labelFormatter;
  this$static.element.style['position'] = 'relative';
  this$static.element['className'] = 'gwt-SliderBar-shell';
  this$static.lineElement = $doc.createElement('div');
  this$static.element.appendChild(this$static.lineElement);
  this$static.lineElement.style['position'] = 'absolute';
  this$static.lineElement['className'] = 'gwt-SliderBar-line';
  $applyTo(($clinit_111() , slider_SINGLETON), this$static.knobImage);
  knobElement = this$static.knobImage.element;
  this$static.element.appendChild(knobElement);
  knobElement.style['position'] = 'absolute';
  knobElement['className'] = 'gwt-SliderBar-knob';
  $add_2(get_1(), this$static);
  sinkEvents(this$static.element, 7164 | (this$static.element.__eventBits || 0));
  return this$static;
}

function $addChangeListener(this$static, listener){
  if (!this$static.changeListeners) {
    this$static.changeListeners = $ChangeListenerCollection(new ChangeListenerCollection());
  }
  $add_3(this$static.changeListeners, listener);
}

function $drawKnob(this$static){
  var knobElement, knobLeftOffset, knobWidth, lineWidth;
  if (!this$static.attached_0) {
    return;
  }
  knobElement = this$static.knobImage.element;
  lineWidth = parseInt(this$static.lineElement['offsetWidth']) || 0;
  knobWidth = parseInt(knobElement['offsetWidth']) || 0;
  knobLeftOffset = ~~Math.max(Math.min(this$static.lineLeftOffset + $getKnobPercent(this$static) * lineWidth - ~~(knobWidth / 2), 2147483647), -2147483648);
  knobLeftOffset = min_0(knobLeftOffset, this$static.lineLeftOffset + lineWidth - ~~(knobWidth / 2) - 1);
  knobElement.style['left'] = knobLeftOffset + 'px';
}

function $drawLabels(this$static){
  var elem, elem$iterator, i, label, labelLeftOffset, labelWidth, lineWidth, value;
  if (!this$static.attached_0) {
    return;
  }
  lineWidth = parseInt(this$static.lineElement['offsetWidth']) || 0;
  if (this$static.numLabels > 0) {
    for (i = 0; i <= this$static.numLabels; ++i) {
      label = null;
      if (i < this$static.labelElements.size) {
        label = dynamicCastJso($get_1(this$static.labelElements, i));
      }
       else {
        label = $doc.createElement('div');
        label.style['position'] = 'absolute';
        label.style['display'] = 'none';
        label['className'] = 'gwt-SliderBar-label';
        this$static.element.appendChild(label);
        $add_3(this$static.labelElements, label);
      }
      value = this$static.minValue + $getTotalRange(this$static) * i / this$static.numLabels;
      label.style['visibility'] = 'hidden';
      label.style['display'] = '';
      label['innerHTML'] = $formatLabel(this$static, value);
      label.style['left'] = '0px';
      labelWidth = parseInt(label['offsetWidth']) || 0;
      labelLeftOffset = this$static.lineLeftOffset + ~~(lineWidth * i / this$static.numLabels) - ~~(labelWidth / 2);
      labelLeftOffset = min_0(labelLeftOffset, this$static.lineLeftOffset + lineWidth - labelWidth);
      labelLeftOffset = max_0(labelLeftOffset, this$static.lineLeftOffset);
      label.style['left'] = labelLeftOffset + 'px';
      label.style['visibility'] = 'visible';
    }
    for (i = this$static.numLabels + 1; i < this$static.labelElements.size; ++i) {
      dynamicCastJso($get_1(this$static.labelElements, i)).style['display'] = 'none';
    }
  }
   else {
    for (elem$iterator = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), this$static.labelElements); elem$iterator.i < elem$iterator.this$0.size_0();) {
      elem = dynamicCastJso($next_1(elem$iterator));
      elem.style['display'] = 'none';
    }
  }
}

function $drawTicks(this$static){
  var elem, elem$iterator, i, lineWidth, tick, tickLeftOffset, tickWidth;
  if (!this$static.attached_0) {
    return;
  }
  lineWidth = parseInt(this$static.lineElement['offsetWidth']) || 0;
  if (this$static.numTicks > 0) {
    for (i = 0; i <= this$static.numTicks; ++i) {
      tick = null;
      if (i < this$static.tickElements.size) {
        tick = dynamicCastJso($get_1(this$static.tickElements, i));
      }
       else {
        tick = $doc.createElement('div');
        tick.style['position'] = 'absolute';
        tick.style['display'] = 'none';
        this$static.element.appendChild(tick);
        $add_3(this$static.tickElements, tick);
      }
      tick['className'] = 'gwt-SliderBar-tick';
      tick.style['visibility'] = 'hidden';
      tick.style['display'] = '';
      tickWidth = parseInt(tick['offsetWidth']) || 0;
      tickLeftOffset = this$static.lineLeftOffset + ~~(lineWidth * i / this$static.numTicks) - ~~(tickWidth / 2);
      tickLeftOffset = min_0(tickLeftOffset, this$static.lineLeftOffset + lineWidth - tickWidth);
      tick.style['left'] = tickLeftOffset + 'px';
      tick.style['visibility'] = 'visible';
    }
    for (i = this$static.numTicks + 1; i < this$static.tickElements.size; ++i) {
      dynamicCastJso($get_1(this$static.tickElements, i)).style['display'] = 'none';
    }
  }
   else {
    for (elem$iterator = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), this$static.tickElements); elem$iterator.i < elem$iterator.this$0.size_0();) {
      elem = dynamicCastJso($next_1(elem$iterator));
      elem.style['display'] = 'none';
    }
  }
}

function $formatLabel(this$static, value){
  if (this$static.labelFormatter) {
    return this$static.labelFormatter.formatLabel(this$static, value);
  }
   else {
    return ~~Math.max(Math.min(10 * value, 2147483647), -2147483648) / 10 + '';
  }
}

function $getKnobPercent(this$static){
  var percent;
  if (this$static.maxValue <= this$static.minValue) {
    return 0;
  }
  percent = (this$static.curValue - this$static.minValue) / (this$static.maxValue - this$static.minValue);
  return 0 > (1 < percent?1:percent)?0:1 < percent?1:percent;
}

function $getTotalRange(this$static){
  if (this$static.minValue > this$static.maxValue) {
    return 0;
  }
   else {
    return this$static.maxValue - this$static.minValue;
  }
}

function $onResize(this$static, width){
  var lineWidth;
  lineWidth = parseInt(this$static.lineElement['offsetWidth']) || 0;
  this$static.lineLeftOffset = ~~(width / 2) - ~~(lineWidth / 2);
  this$static.lineElement.style['left'] = this$static.lineLeftOffset + 'px';
  $drawLabels(this$static);
  $drawTicks(this$static);
  $drawKnob(this$static);
}

function $redraw(this$static){
  var width;
  if (this$static.attached_0) {
    width = parseInt(this$static.element['clientWidth']) || 0;
    parseInt(this$static.element['clientHeight']) || 0;
    $onResize(this$static, width);
  }
}

function $setCurrentValue(this$static, curValue, fireEvent){
  var remainder;
  this$static.curValue = max(this$static.minValue, min(this$static.maxValue, curValue));
  remainder = (this$static.curValue - this$static.minValue) % this$static.stepSize;
  this$static.curValue -= remainder;
  if (remainder > this$static.stepSize / 2 && this$static.curValue + this$static.stepSize <= this$static.maxValue) {
    this$static.curValue += this$static.stepSize;
  }
  $drawKnob(this$static);
  if (fireEvent && !!this$static.changeListeners) {
    $fireChange(this$static.changeListeners, this$static);
  }
}

function $slideKnob(this$static, event_0){
  var lineLeft, lineWidth, percent, x;
  x = event_0.clientX || 0;
  if (x > 0) {
    lineWidth = parseInt(this$static.lineElement['offsetWidth']) || 0;
    lineLeft = $getAbsoluteLeft(this$static.lineElement);
    percent = (x - lineLeft) / lineWidth;
    $setCurrentValue(this$static, $getTotalRange(this$static) * percent + this$static.minValue, true);
  }
}

function $startSliding(this$static, highlight){
  if (highlight) {
    this$static.lineElement['className'] = 'gwt-SliderBar-line gwt-SliderBar-line-sliding';
    this$static.knobImage.element['className'] = 'gwt-SliderBar-knob gwt-SliderBar-knob-sliding';
    $applyTo(($clinit_111() , sliderSliding_SINGLETON), this$static.knobImage);
  }
}

function $stopSliding(this$static, unhighlight){
  if (unhighlight) {
    this$static.lineElement['className'] = 'gwt-SliderBar-line';
    this$static.knobImage.element['className'] = 'gwt-SliderBar-knob';
    $applyTo(($clinit_111() , slider_SINGLETON), this$static.knobImage);
  }
}

function onBrowserEvent_6(event_0){
  var multiplier, velocityY, styleName;
  $eventGetTypeInt(event_0);
  switch ($eventGetTypeInt(event_0)) {
    case 4096:
      $cancel(this.keyTimer);
      if (this.slidingMouse) {
        releaseCapture(this.element);
        this.slidingMouse = false;
        $slideKnob(this, event_0);
        $stopSliding(this, true);
      }
       else if (this.slidingKeyboard) {
        this.slidingKeyboard = false;
        $stopSliding(this, true);
      }

      this.element['className'] = getStylePrimaryName(this.element);
      break;
    case 2048:
      styleName = getStylePrimaryName(this.element);
      this.element['className'] = styleName + ' ' + styleName + '-focused';
      break;
    case 131072:
      velocityY = event_0.detail * 4 || 0;
      event_0.preventDefault();
      if (velocityY > 0) {
        $setCurrentValue(this, this.curValue + this.stepSize, true);
      }
       else {
        $setCurrentValue(this, this.curValue - this.stepSize, true);
      }

      break;
    case 128:
      if (!this.slidingKeyboard) {
        multiplier = 1;
        if (event_0.ctrlKey) {
          multiplier = ~~Math.max(Math.min($getTotalRange(this) / this.stepSize / 10, 2147483647), -2147483648);
        }
        switch (event_0.which || (event_0.keyCode || 0)) {
          case 36:
            event_0.preventDefault();
            $setCurrentValue(this, this.minValue, true);
            break;
          case 35:
            event_0.preventDefault();
            $setCurrentValue(this, this.maxValue, true);
            break;
          case 37:
            event_0.preventDefault();
            this.slidingKeyboard = true;
            $startSliding(this, false);
            $setCurrentValue(this, this.curValue - multiplier * this.stepSize, true);
            $schedule_0(this.keyTimer, 400, false, multiplier);
            break;
          case 39:
            event_0.preventDefault();
            this.slidingKeyboard = true;
            $startSliding(this, false);
            $setCurrentValue(this, this.curValue + multiplier * this.stepSize, true);
            $schedule_0(this.keyTimer, 400, true, multiplier);
            break;
          case 32:
            event_0.preventDefault();
            $setCurrentValue(this, this.minValue + $getTotalRange(this) / 2, true);
        }
      }

      break;
    case 512:
      $cancel(this.keyTimer);
      if (this.slidingKeyboard) {
        this.slidingKeyboard = false;
        $stopSliding(this, true);
      }

      break;
    case 4:
      $setFocus(this, true);
      this.slidingMouse = true;
      setCapture(this.element);
      $startSliding(this, true);
      event_0.preventDefault();
      $slideKnob(this, event_0);
      break;
    case 8:
      if (this.slidingMouse) {
        releaseCapture(this.element);
        this.slidingMouse = false;
        $slideKnob(this, event_0);
        $stopSliding(this, true);
      }

      break;
    case 64:
      if (this.slidingMouse) {
        $slideKnob(this, event_0);
      }

  }
}

function onLoad_1(){
  this.element.style['position'] = 'relative';
  $redraw(this);
}

function SliderBar(){
}

_ = SliderBar.prototype = new FocusPanel();
_.onBrowserEvent = onBrowserEvent_6;
_.onLoad = onLoad_1;
_.typeId$ = 38;
_.changeListeners = null;
_.curValue = 0;
_.labelFormatter = null;
_.lineElement = null;
_.lineLeftOffset = 0;
_.maxValue = 0;
_.minValue = 0;
_.numLabels = 0;
_.numTicks = 0;
_.slidingKeyboard = false;
_.slidingMouse = false;
_.stepSize = 0;
function $clinit_107(){
  $clinit_107 = nullMethod;
  $clinit_34();
}

function $SliderBar$KeyTimer(this$static, this$0){
  $clinit_107();
  this$static.this$0 = this$0;
  return this$static;
}

function $schedule_0(this$static, delayMillis, shiftRight, multiplier){
  this$static.firstRun = true;
  this$static.shiftRight = shiftRight;
  this$static.multiplier = multiplier;
  $schedule(this$static, delayMillis);
}

function run_2(){
  if (this.firstRun) {
    this.firstRun = false;
    $startSliding(this.this$0, true);
  }
  if (this.shiftRight) {
    $setCurrentValue(this.this$0, this.this$0.curValue + this.multiplier * this.this$0.stepSize, true);
  }
   else {
    $setCurrentValue(this.this$0, this.this$0.curValue - this.multiplier * this.this$0.stepSize, true);
  }
  $schedule(this, 30);
}

function SliderBar$KeyTimer(){
}

_ = SliderBar$KeyTimer.prototype = new Timer();
_.run = run_2;
_.typeId$ = 39;
_.firstRun = true;
_.multiplier = 1;
_.shiftRight = false;
_.this$0 = null;
function $clinit_111(){
  $clinit_111 = nullMethod;
  IMAGE_BUNDLE_URL = $moduleBase + '55FE578766A1AC09EFD868E978B16C52.cache.png';
  slider_SINGLETON = $ClippedImagePrototype(new ClippedImagePrototype(), IMAGE_BUNDLE_URL, 22, 0, 11, 21);
  $ClippedImagePrototype(new ClippedImagePrototype(), IMAGE_BUNDLE_URL, 11, 0, 11, 21);
  sliderSliding_SINGLETON = $ClippedImagePrototype(new ClippedImagePrototype(), IMAGE_BUNDLE_URL, 0, 0, 11, 21);
}

function SliderBar_SliderBarImages_generatedBundle(){
}

_ = SliderBar_SliderBarImages_generatedBundle.prototype = new Object_0();
_.typeId$ = 0;
var IMAGE_BUNDLE_URL, sliderSliding_SINGLETON, slider_SINGLETON;
function ArrayStoreException(){
}

_ = ArrayStoreException.prototype = new RuntimeException();
_.typeId$ = 41;
function createForArray(packageName, className){
  var clazz;
  clazz = new Class();
  return clazz;
}

function Class(){
}

_ = Class.prototype = new Object_0();
_.typeId$ = 0;
function ClassCastException(){
}

_ = ClassCastException.prototype = new RuntimeException();
_.typeId$ = 44;
function IllegalArgumentException(){
}

_ = IllegalArgumentException.prototype = new RuntimeException();
_.typeId$ = 45;
function IllegalStateException(){
}

_ = IllegalStateException.prototype = new RuntimeException();
_.typeId$ = 46;
function $IndexOutOfBoundsException(this$static, message){
  return this$static;
}

function IndexOutOfBoundsException(){
}

_ = IndexOutOfBoundsException.prototype = new RuntimeException();
_.typeId$ = 47;
function max(x, y){
  return x > y?x:y;
}

function max_0(x, y){
  return x > y?x:y;
}

function min(x, y){
  return x < y?x:y;
}

function min_0(x, y){
  return x < y?x:y;
}

function NullPointerException(){
}

_ = NullPointerException.prototype = new RuntimeException();
_.typeId$ = 48;
function $equals_0(this$static, other){
  if (!(other != null && canCast(other.typeId$, 1))) {
    return false;
  }
  return String(this$static) == other;
}

function $substring(this$static, beginIndex){
  return this$static.substr(beginIndex, this$static.length - beginIndex);
}

function $trim(this$static){
  if (this$static.length == 0 || this$static[0] > ' ' && this$static[this$static.length - 1] > ' ') {
    return this$static;
  }
  var r1 = this$static.replace(/^(\s*)/, '');
  var r2 = r1.replace(/\s*$/, '');
  return r2;
}

function equals_1(other){
  return $equals_0(this, other);
}

function fromCodePoint(codePoint){
  var hiSurrogate, loSurrogate;
  if (codePoint >= 65536) {
    hiSurrogate = 55296 + (codePoint - 65536 >> 10 & 1023) & 65535;
    loSurrogate = 56320 + (codePoint - 65536 & 1023) & 65535;
    return String.fromCharCode(hiSurrogate) + String.fromCharCode(loSurrogate);
  }
   else {
    return String.fromCharCode(codePoint & 65535);
  }
}

function hashCode_2(){
  return getHashCode_0(this);
}

_ = String.prototype;
_.equals$ = equals_1;
_.hashCode$ = hashCode_2;
_.typeId$ = 2;
function $clinit_130(){
  $clinit_130 = nullMethod;
  back = {};
  front = {};
}

function compute(str){
  var hashCode, i, inc, n;
  n = str.length;
  inc = n < 64?1:~~(n / 32);
  hashCode = 0;
  for (i = 0; i < n; i += inc) {
    hashCode <<= 1;
    hashCode += str.charCodeAt(i);
  }
  hashCode |= 0;
  return hashCode;
}

function getHashCode_0(str){
  $clinit_130();
  var key = ':' + str;
  var result = front[key];
  if (result != null) {
    return result;
  }
  result = back[key];
  if (result == null) {
    result = compute(str);
  }
  increment();
  return front[key] = result;
}

function increment(){
  if (count_0 == 256) {
    back = front;
    front = {};
    count_0 = 0;
  }
  ++count_0;
}

var back, count_0 = 0, front;
function UnsupportedOperationException(){
}

_ = UnsupportedOperationException.prototype = new RuntimeException();
_.typeId$ = 51;
function $keySet(this$static){
  var entrySet;
  entrySet = $AbstractHashMap$EntrySet(new AbstractHashMap$EntrySet(), this$static);
  return $AbstractMap$1(new AbstractMap$1(), this$static, entrySet);
}

function equals_4(obj){
  var entry, entry$iterator, otherKey, otherMap, otherValue;
  if ((obj == null?null:obj) === (this == null?null:this)) {
    return true;
  }
  if (!(obj != null && canCast(obj.typeId$, 22))) {
    return false;
  }
  otherMap = dynamicCast(obj, 22);
  if (dynamicCast(this, 22).size != otherMap.size) {
    return false;
  }
  for (entry$iterator = $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator(), $AbstractHashMap$EntrySet(new AbstractHashMap$EntrySet(), otherMap).this$0); $hasNext_0(entry$iterator.iter);) {
    entry = dynamicCast($next_1(entry$iterator.iter), 18);
    otherKey = entry.getKey();
    otherValue = entry.getValue();
    if (!(otherKey == null?dynamicCast(this, 22).nullSlotLive:otherKey != null && canCast(otherKey.typeId$, 1)?$hasStringValue(dynamicCast(this, 22), dynamicCast(otherKey, 1)):$hasHashValue(dynamicCast(this, 22), otherKey, ~~hashCode__devirtual$(otherKey)))) {
      return false;
    }
    if (!equalsWithNullCheck(otherValue, otherKey == null?dynamicCast(this, 22).nullSlot:otherKey != null && canCast(otherKey.typeId$, 1)?dynamicCast(this, 22).stringMap[':' + dynamicCast(otherKey, 1)]:$getHashValue(dynamicCast(this, 22), otherKey, ~~hashCode__devirtual$(otherKey)))) {
      return false;
    }
  }
  return true;
}

function hashCode_5(){
  var entry, entry$iterator, hashCode;
  hashCode = 0;
  for (entry$iterator = $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator(), $AbstractHashMap$EntrySet(new AbstractHashMap$EntrySet(), dynamicCast(this, 22)).this$0); $hasNext_0(entry$iterator.iter);) {
    entry = dynamicCast($next_1(entry$iterator.iter), 18);
    hashCode += entry.hashCode$();
    hashCode = ~~hashCode;
  }
  return hashCode;
}

function AbstractMap(){
}

_ = AbstractMap.prototype = new Object_0();
_.equals$ = equals_4;
_.hashCode$ = hashCode_5;
_.typeId$ = 0;
function $addAllHashEntries(this$static, dest){
  var hashCodeMap = this$static.hashCodeMap;
  for (var hashCode in hashCodeMap) {
    if (hashCode == parseInt(hashCode)) {
      var array = hashCodeMap[hashCode];
      for (var i = 0, c = array.length; i < c; ++i) {
        dest.add_2(array[i]);
      }
    }
  }
}

function $addAllStringEntries(this$static, dest){
  var stringMap = this$static.stringMap;
  for (var key in stringMap) {
    if (key.charCodeAt(0) == 58) {
      var entry = new_$(this$static, key.substring(1));
      dest.add_2(entry);
    }
  }
}

function $clearImpl(this$static){
  this$static.hashCodeMap = [];
  this$static.stringMap = {};
  this$static.nullSlotLive = false;
  this$static.nullSlot = null;
  this$static.size = 0;
}

function $containsKey(this$static, key){
  return key == null?this$static.nullSlotLive:key != null && canCast(key.typeId$, 1)?$hasStringValue(this$static, dynamicCast(key, 1)):$hasHashValue(this$static, key, ~~hashCode__devirtual$(key));
}

function $get_0(this$static, key){
  return key == null?this$static.nullSlot:key != null && canCast(key.typeId$, 1)?this$static.stringMap[':' + dynamicCast(key, 1)]:$getHashValue(this$static, key, ~~hashCode__devirtual$(key));
}

function $getHashValue(this$static, key, hashCode){
  var array = this$static.hashCodeMap[hashCode];
  if (array) {
    for (var i = 0, c = array.length; i < c; ++i) {
      var entry = array[i];
      var entryKey = entry.getKey();
      if (this$static.equalsBridge(key, entryKey)) {
        return entry.getValue();
      }
    }
  }
  return null;
}

function $hasHashValue(this$static, key, hashCode){
  var array = this$static.hashCodeMap[hashCode];
  if (array) {
    for (var i = 0, c = array.length; i < c; ++i) {
      var entry = array[i];
      var entryKey = entry.getKey();
      if (this$static.equalsBridge(key, entryKey)) {
        return true;
      }
    }
  }
  return false;
}

function $hasStringValue(this$static, key){
  return ':' + key in this$static.stringMap;
}

function $put(this$static, key, value){
  return key == null?$putNullSlot(this$static, value):key != null && canCast(key.typeId$, 1)?$putStringValue(this$static, dynamicCast(key, 1), value):$putHashValue(this$static, key, value, ~~hashCode__devirtual$(key));
}

function $putHashValue(this$static, key, value, hashCode){
  var array = this$static.hashCodeMap[hashCode];
  if (array) {
    for (var i = 0, c = array.length; i < c; ++i) {
      var entry = array[i];
      var entryKey = entry.getKey();
      if (this$static.equalsBridge(key, entryKey)) {
        var previous = entry.getValue();
        entry.setValue(value);
        return previous;
      }
    }
  }
   else {
    array = this$static.hashCodeMap[hashCode] = [];
  }
  var entry = $MapEntryImpl(new MapEntryImpl(), key, value);
  array.push(entry);
  ++this$static.size;
  return null;
}

function $putNullSlot(this$static, value){
  var result;
  result = this$static.nullSlot;
  this$static.nullSlot = value;
  if (!this$static.nullSlotLive) {
    this$static.nullSlotLive = true;
    ++this$static.size;
  }
  return result;
}

function $putStringValue(this$static, key, value){
  var result, stringMap = this$static.stringMap;
  key = ':' + key;
  if (key in stringMap) {
    result = stringMap[key];
  }
   else {
    ++this$static.size;
  }
  stringMap[key] = value;
  return result;
}

function equalsBridge(value1, value2){
  return (value1 == null?null:value1) === (value2 == null?null:value2) || value1 != null && equals__devirtual$(value1, value2);
}

function AbstractHashMap(){
}

_ = AbstractHashMap.prototype = new AbstractMap();
_.equalsBridge = equalsBridge;
_.typeId$ = 0;
_.hashCodeMap = null;
_.nullSlot = null;
_.nullSlotLive = false;
_.size = 0;
_.stringMap = null;
function equals_5(o){
  var iter, other, otherItem;
  if ((o == null?null:o) === (this == null?null:this)) {
    return true;
  }
  if (!(o != null && canCast(o.typeId$, 23))) {
    return false;
  }
  other = dynamicCast(o, 23);
  if (other.size_0() != this.size_0()) {
    return false;
  }
  for (iter = other.iterator_0(); iter.hasNext();) {
    otherItem = iter.next_0();
    if (!this.contains(otherItem)) {
      return false;
    }
  }
  return true;
}

function hashCode_6(){
  var hashCode, iter, next;
  hashCode = 0;
  for (iter = this.iterator_0(); iter.hasNext();) {
    next = iter.next_0();
    if (next != null) {
      hashCode += hashCode__devirtual$(next);
      hashCode = ~~hashCode;
    }
  }
  return hashCode;
}

function AbstractSet(){
}

_ = AbstractSet.prototype = new AbstractCollection();
_.equals$ = equals_5;
_.hashCode$ = hashCode_6;
_.typeId$ = 52;
function $AbstractHashMap$EntrySet(this$static, this$0){
  this$static.this$0 = this$0;
  return this$static;
}

function contains_0(o){
  var entry, key, value;
  if (o != null && canCast(o.typeId$, 18)) {
    entry = dynamicCast(o, 18);
    key = entry.getKey();
    if ($containsKey(this.this$0, key)) {
      value = $get_0(this.this$0, key);
      return $equals_1(entry.getValue(), value);
    }
  }
  return false;
}

function iterator_2(){
  return $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator(), this.this$0);
}

function size_0(){
  return this.this$0.size;
}

function AbstractHashMap$EntrySet(){
}

_ = AbstractHashMap$EntrySet.prototype = new AbstractSet();
_.contains = contains_0;
_.iterator_0 = iterator_2;
_.size_0 = size_0;
_.typeId$ = 53;
_.this$0 = null;
function $AbstractHashMap$EntrySetIterator(this$static, this$0){
  var list;
  this$static.this$0 = this$0;
  list = $ArrayList(new ArrayList());
  if (this$static.this$0.nullSlotLive) {
    $add_3(list, $AbstractHashMap$MapEntryNull(new AbstractHashMap$MapEntryNull(), this$static.this$0));
  }
  $addAllStringEntries(this$static.this$0, list);
  $addAllHashEntries(this$static.this$0, list);
  this$static.iter = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), list);
  return this$static;
}

function hasNext_3(){
  return $hasNext_0(this.iter);
}

function next_4(){
  return dynamicCast($next_1(this.iter), 18);
}

function AbstractHashMap$EntrySetIterator(){
}

_ = AbstractHashMap$EntrySetIterator.prototype = new Object_0();
_.hasNext = hasNext_3;
_.next_0 = next_4;
_.typeId$ = 0;
_.iter = null;
_.this$0 = null;
function equals_3(other){
  var entry;
  if (other != null && canCast(other.typeId$, 18)) {
    entry = dynamicCast(other, 18);
    if (equalsWithNullCheck(this.getKey(), entry.getKey()) && equalsWithNullCheck(this.getValue(), entry.getValue())) {
      return true;
    }
  }
  return false;
}

function hashCode_4(){
  var keyHash, valueHash;
  keyHash = 0;
  valueHash = 0;
  if (this.getKey() != null) {
    keyHash = hashCode__devirtual$(this.getKey());
  }
  if (this.getValue() != null) {
    valueHash = hashCode__devirtual$(this.getValue());
  }
  return keyHash ^ valueHash;
}

function AbstractMapEntry(){
}

_ = AbstractMapEntry.prototype = new Object_0();
_.equals$ = equals_3;
_.hashCode$ = hashCode_4;
_.typeId$ = 54;
function $AbstractHashMap$MapEntryNull(this$static, this$0){
  this$static.this$0 = this$0;
  return this$static;
}

function getKey(){
  return null;
}

function getValue(){
  return this.this$0.nullSlot;
}

function setValue(object){
  return $putNullSlot(this.this$0, object);
}

function AbstractHashMap$MapEntryNull(){
}

_ = AbstractHashMap$MapEntryNull.prototype = new AbstractMapEntry();
_.getKey = getKey;
_.getValue = getValue;
_.setValue = setValue;
_.typeId$ = 55;
_.this$0 = null;
function $AbstractHashMap$MapEntryString(this$static, key, this$0){
  this$static.this$0 = this$0;
  this$static.key = key;
  return this$static;
}

function getKey_0(){
  return this.key;
}

function getValue_0(){
  return this.this$0.stringMap[':' + this.key];
}

function new_$(this$outer, key){
  return $AbstractHashMap$MapEntryString(new AbstractHashMap$MapEntryString(), key, this$outer);
}

function setValue_0(object){
  return $putStringValue(this.this$0, this.key, object);
}

function AbstractHashMap$MapEntryString(){
}

_ = AbstractHashMap$MapEntryString.prototype = new AbstractMapEntry();
_.getKey = getKey_0;
_.getValue = getValue_0;
_.setValue = setValue_0;
_.typeId$ = 56;
_.key = null;
_.this$0 = null;
function $AbstractList$IteratorImpl(this$static, this$0){
  this$static.this$0 = this$0;
  return this$static;
}

function $hasNext_0(this$static){
  return this$static.i < this$static.this$0.size_0();
}

function $next_1(this$static){
  if (this$static.i >= this$static.this$0.size_0()) {
    throw new NoSuchElementException();
  }
  return this$static.this$0.get(this$static.i++);
}

function hasNext_4(){
  return this.i < this.this$0.size_0();
}

function next_5(){
  return $next_1(this);
}

function AbstractList$IteratorImpl(){
}

_ = AbstractList$IteratorImpl.prototype = new Object_0();
_.hasNext = hasNext_4;
_.next_0 = next_5;
_.typeId$ = 0;
_.i = 0;
_.this$0 = null;
function $AbstractMap$1(this$static, this$0, val$entrySet){
  this$static.this$0 = this$0;
  this$static.val$entrySet = val$entrySet;
  return this$static;
}

function contains_1(key){
  return $containsKey(this.this$0, key);
}

function iterator_4(){
  var outerIter;
  return outerIter = $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator(), this.val$entrySet.this$0) , $AbstractMap$1$1(new AbstractMap$1$1(), outerIter);
}

function size_1(){
  return this.val$entrySet.this$0.size;
}

function AbstractMap$1(){
}

_ = AbstractMap$1.prototype = new AbstractSet();
_.contains = contains_1;
_.iterator_0 = iterator_4;
_.size_0 = size_1;
_.typeId$ = 57;
_.this$0 = null;
_.val$entrySet = null;
function $AbstractMap$1$1(this$static, val$outerIter){
  this$static.val$outerIter = val$outerIter;
  return this$static;
}

function hasNext_5(){
  return this.val$outerIter.hasNext();
}

function next_6(){
  var entry;
  return entry = this.val$outerIter.next_0() , entry.getKey();
}

function AbstractMap$1$1(){
}

_ = AbstractMap$1$1.prototype = new Object_0();
_.hasNext = hasNext_5;
_.next_0 = next_6;
_.typeId$ = 0;
_.val$outerIter = null;
function $HashMap(this$static){
  $clearImpl(this$static);
  return this$static;
}

function $equals_1(value1, value2){
  return (value1 == null?null:value1) === (value2 == null?null:value2) || value1 != null && equals__devirtual$(value1, value2);
}

function HashMap(){
}

_ = HashMap.prototype = new AbstractHashMap();
_.typeId$ = 58;
function $HashSet(this$static){
  this$static.map = $HashMap(new HashMap());
  return this$static;
}

function $add_4(this$static, o){
  var old;
  old = $put(this$static.map, o, this$static);
  return old == null;
}

function add_6(o){
  var old;
  return old = $put(this.map, o, this) , old == null;
}

function contains_3(o){
  return $containsKey(this.map, o);
}

function iterator_5(){
  var outerIter;
  return outerIter = $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator(), $keySet(this.map).val$entrySet.this$0) , $AbstractMap$1$1(new AbstractMap$1$1(), outerIter);
}

function size_3(){
  return this.map.size;
}

function HashSet(){
}

_ = HashSet.prototype = new AbstractSet();
_.add_2 = add_6;
_.contains = contains_3;
_.iterator_0 = iterator_5;
_.size_0 = size_3;
_.typeId$ = 59;
_.map = null;
function $MapEntryImpl(this$static, key, value){
  this$static.key = key;
  this$static.value = value;
  return this$static;
}

function getKey_1(){
  return this.key;
}

function getValue_1(){
  return this.value;
}

function setValue_1(value){
  var old;
  old = this.value;
  this.value = value;
  return old;
}

function MapEntryImpl(){
}

_ = MapEntryImpl.prototype = new AbstractMapEntry();
_.getKey = getKey_1;
_.getValue = getValue_1;
_.setValue = setValue_1;
_.typeId$ = 60;
_.key = null;
_.value = null;
function NoSuchElementException(){
}

_ = NoSuchElementException.prototype = new RuntimeException();
_.typeId$ = 61;
function equalsWithNullCheck(a, b){
  return (a == null?null:a) === (b == null?null:b) || a != null && equals__devirtual$(a, b);
}

function $ButtonDemo(this$static){
  var b, bar, bb, cb, cbt, cdb, cdbt, clb, db, lf, lnk, rb, rbt, rbtxtp, rrbt, sb, sbs, sp, sr, srr, t;
  this$static.ft = $FlexTable(new FlexTable());
  $initWidget(this$static, this$static.ft);
  this$static.ft.tableElem['cellPadding'] = 5;
  b = $Button_0(new Button(), 'Button');
  $setWidget(this$static.ft, this$static.row, 0, b);
  $setHTML(this$static.ft, this$static.row++, 1, 'Button b = new Button("Button");'.fixed());
  $setVerticalAlign(this$static.ft.rowFormatter, this$static.row++, ($clinit_71() , ALIGN_MIDDLE));
  bb = $Button_0(new Button(), 'Bold Button');
  $setWidget(this$static.ft, this$static.row, 0, bb);
  bb.element.style['fontWeight'] = 'bold';
  $setHTML(this$static.ft, this$static.row++, 1, 'Button b = new Button("Bold Button");<br>CSS.setProperty(b, CSS.A.FONT_WEIGHT, CSS.V.FONT_WEIGHT.BOLD);'.fixed());
  $setVerticalAlign(this$static.ft.rowFormatter, this$static.row++, ALIGN_MIDDLE);
  db = $Button_0(new Button(), 'Disabled Button');
  $setEnabled(db, false);
  $setWidget(this$static.ft, this$static.row, 0, db);
  $setHTML(this$static.ft, this$static.row++, 1, 'Button b = new Button("Disabled Button");<br>b.setEnabled(false);'.fixed());
  $setVerticalAlign(this$static.ft.rowFormatter, this$static.row++, ALIGN_MIDDLE);
  bar = $ButtonBar(new ButtonBar());
  bar.element.style['width'] = '250px';
  clb = $Button_0(new Button(), 'Remove Button');
  $setWidget(this$static.ft, this$static.row, 0, clb);
  $setHTML(this$static.ft, this$static.row++, 1, 'Button b = new Button("Button");<br>b.addClickListener(new ClickListener() {<br>&nbsp;&nbsp;public void onClick(Widget sender) {<br>&nbsp;&nbsp;&nbsp;&nbsp;//action to update button bar<br>&nbsp;&nbsp;}<br>});'.fixed());
  $setVerticalAlign(this$static.ft.rowFormatter, this$static.row++, ALIGN_MIDDLE);
  $addClickListener(clb, $ButtonDemo$1(new ButtonDemo$1(), bar, clb));
  $add_5(bar, $Button_0(new Button(), 'Button 1'));
  $add_5(bar, $Button_0(new Button(), 'Button 2'));
  $add_5(bar, $Button_0(new Button(), 'Button 3'));
  $add_5(bar, $Button_0(new Button(), 'Button 4'));
  $setWidget(this$static.ft, this$static.row, 0, bar);
  $setHTML(this$static.ft, this$static.row++, 1, 'ButtonBar bar = new ButtonBar();<br>bar.add(new Button("Button 1"));<br>bar.add(new Button("Button 2"));<br>bar.add(new Button("Button 3"));<br>bar.add(new Button("Button 4"));'.fixed());
  $setVerticalAlign(this$static.ft.rowFormatter, this$static.row++, ALIGN_MIDDLE);
  cb = $Button_0(new Button(), 'Custom Color Button');
  $setWidget(this$static.ft, this$static.row, 0, cb);
  cbt = $HTML_0(new HTML(), ('Button b = new Button("Custom Color Button");<br>b.setColor(' + this$static.hue + ',' + this$static.sat + ');').fixed());
  $setWidget(this$static.ft, this$static.row++, 1, cbt);
  $setVerticalAlign(this$static.ft.rowFormatter, this$static.row++, ALIGN_MIDDLE);
  cdb = $Button_0(new Button(), 'Custom Color Disabled Button');
  $setEnabled(cdb, false);
  $setWidget(this$static.ft, this$static.row, 0, cdb);
  cdbt = $HTML_0(new HTML(), ('Button b = new Button("Custom Color Button");<br>b.setColor(' + this$static.hue + ',' + this$static.sat + ');<br>b.setEnabled(false);').fixed());
  $setWidget(this$static.ft, this$static.row++, 1, cdbt);
  $setVerticalAlign(this$static.ft.rowFormatter, this$static.row++, ALIGN_MIDDLE);
  lf = new ButtonDemo$2();
  sb = $SliderBar(new SliderBar(), 0, 360);
  sb.stepSize = 1;
  $setCurrentValue(sb, sb.curValue, true);
  sb.numLabels = 10;
  $drawLabels(sb);
  sb.labelFormatter = lf;
  sb.numTicks = 10;
  $drawTicks(sb);
  $addChangeListener(sb, $ButtonDemo$3(new ButtonDemo$3(), this$static, sb, cb, cdb, cbt, cdbt));
  $setCurrentValue(sb, 180, true);
  $setWidget(this$static.ft, this$static.row, 0, $Label_1(new Label(), 'Hue:'));
  $setColSpan_0(this$static.ft.cellFormatter, this$static.row++, 0, 2);
  $setWidget(this$static.ft, this$static.row, 0, sb);
  $setColSpan_0(this$static.ft.cellFormatter, this$static.row++, 0, 2);
  sbs = $SliderBar(new SliderBar(), 0, 100);
  sbs.stepSize = 1;
  $setCurrentValue(sbs, sbs.curValue, true);
  sbs.numLabels = 10;
  $drawLabels(sbs);
  sbs.labelFormatter = lf;
  sbs.numTicks = 10;
  $drawTicks(sbs);
  $addChangeListener(sbs, $ButtonDemo$4(new ButtonDemo$4(), this$static, sbs, cb, cdb, cbt, cdbt));
  $setCurrentValue(sbs, 50, true);
  $setWidget(this$static.ft, this$static.row, 0, $Label_1(new Label(), 'Saturation:'));
  $setColSpan_0(this$static.ft.cellFormatter, this$static.row++, 0, 2);
  $setWidget(this$static.ft, this$static.row, 0, sbs);
  $setColSpan_0(this$static.ft.cellFormatter, this$static.row++, 0, 2);
  rb = $Button_0(new Button(), 'Resized Button');
  $setWidget(this$static.ft, this$static.row, 0, rb);
  rbtxtp = $FlowPanel(new FlowPanel());
  $setWidget(this$static.ft, this$static.row++, 1, rbtxtp);
  $setVerticalAlign(this$static.ft.rowFormatter, this$static.row++, ALIGN_MIDDLE);
  rbtxtp.add_1($HTML_0(new HTML(), 'Button b = new Button("Resized Button");'.fixed()));
  rbt = $HTML_0(new HTML(), 'Button b = new Button("Custom Color Button");<br>b.setColor(70); // size is in percentage.');
  rbtxtp.add_1(rbt);
  sr = $SliderBar(new SliderBar(), 0, 1000);
  sr.stepSize = 10;
  $setCurrentValue(sr, sr.curValue, true);
  sr.numLabels = 10;
  $drawLabels(sr);
  sr.labelFormatter = lf;
  sr.numTicks = 10;
  $drawTicks(sr);
  $addChangeListener(sr, $ButtonDemo$5(new ButtonDemo$5(), sr, rb, rbt));
  $setCurrentValue(sr, 70, true);
  $setWidget(this$static.ft, this$static.row, 0, $Label_1(new Label(), 'Size:'));
  $setColSpan_0(this$static.ft.cellFormatter, this$static.row++, 0, 2);
  $setWidget(this$static.ft, this$static.row, 0, sr);
  $setColSpan_0(this$static.ft.cellFormatter, this$static.row++, 0, 2);
  rrbt = $HTML_0(new HTML(), 'Button b = new Button("Custom Color Button");<br>b.setColor(1, 1); // ratio size is in em.');
  rbtxtp.add_1(rrbt);
  srr = $SliderBar(new SliderBar(), 0, 5);
  srr.stepSize = 0.1;
  $setCurrentValue(srr, srr.curValue, true);
  srr.numLabels = 10;
  $drawLabels(srr);
  srr.labelFormatter = new ButtonDemo$6();
  srr.numTicks = 10;
  $drawTicks(srr);
  $addChangeListener(srr, $ButtonDemo$7(new ButtonDemo$7(), this$static, srr, rb, rrbt));
  $setCurrentValue(srr, 1, true);
  $setWidget(this$static.ft, this$static.row, 0, $Label_1(new Label(), 'Ratio:'));
  $setColSpan_0(this$static.ft.cellFormatter, this$static.row++, 0, 2);
  $setWidget(this$static.ft, this$static.row, 0, srr);
  $setColSpan_0(this$static.ft.cellFormatter, this$static.row++, 0, 2);
  sp = $SliderBar(new SliderBar(), 1, 50);
  sp.stepSize = 1;
  $setCurrentValue(sp, sp.curValue, true);
  sp.numLabels = 10;
  $drawLabels(sp);
  sp.labelFormatter = lf;
  sp.numTicks = 10;
  $drawTicks(sp);
  $addChangeListener(sp, $ButtonDemo$8(new ButtonDemo$8(), this$static, sp, rb, rrbt));
  $setCurrentValue(sp, 8, true);
  $setWidget(this$static.ft, this$static.row, 0, $Label_1(new Label(), 'Padding:'));
  $setColSpan_0(this$static.ft.cellFormatter, this$static.row++, 0, 2);
  $setWidget(this$static.ft, this$static.row, 0, sp);
  $setColSpan_0(this$static.ft.cellFormatter, this$static.row++, 0, 2);
  t = $FlowPanel(new FlowPanel());
  t.add_1($TextNode(new TextNode(), 'The Slider is from the '));
  lnk = $Link(new Link(), 'http://code.google.com/docreader/#p=google-web-toolkit-incubator&s=google-web-toolkit-incubator&t=SliderBar', 'GWT Incubator Project');
  lnk.element.name = 'external';
  lnk.element.target = '_blank';
  t.add_1(lnk);
  t.add_1($TextNode(new TextNode(), '.'));
  $setWidget(this$static.ft, this$static.row, 0, t);
  $setColSpan_0(this$static.ft.cellFormatter, this$static.row++, 0, 2);
  return this$static;
}

function ButtonDemo(){
}

_ = ButtonDemo.prototype = new Composite();
_.typeId$ = 62;
_.hue = 0;
_.padding = 0;
_.ratio = 0;
_.row = 0;
_.sat = 0;
function $ButtonDemo$1(this$static, val$bar, val$clb){
  this$static.val$bar = val$bar;
  this$static.val$clb = val$clb;
  return this$static;
}

function $onClick(this$static){
  var s;
  s = this$static.val$bar.children.size;
  if (this$static.add) {
    $add_5(this$static.val$bar, $Button_0(new Button(), 'Button ' + (s + 1)));
  }
   else {
    $remove_8(this$static.val$bar, s - 1);
  }
  if (s == 1 || s == 3) {
    this$static.add = s == 1;
    $setInnerText(this$static.val$clb.buttonContent, (this$static.add?'Add':'Remove') + ' Button');
    $setTitle(this$static.val$clb, (this$static.add?'Add':'Remove') + ' Button');
  }
}

function ButtonDemo$1(){
}

_ = ButtonDemo$1.prototype = new Object_0();
_.typeId$ = 63;
_.add = false;
_.val$bar = null;
_.val$clb = null;
function formatLabel(slider, value){
  return '' + ~~Math.max(Math.min(value, 2147483647), -2147483648);
}

function ButtonDemo$2(){
}

_ = ButtonDemo$2.prototype = new Object_0();
_.formatLabel = formatLabel;
_.typeId$ = 0;
function $ButtonDemo$3(this$static, this$0, val$sb, val$cb, val$cdb, val$cbt, val$cdbt){
  this$static.this$0 = this$0;
  this$static.val$sb = val$sb;
  this$static.val$cb = val$cb;
  this$static.val$cdb = val$cdb;
  this$static.val$cbt = val$cbt;
  this$static.val$cdbt = val$cdbt;
  return this$static;
}

function onChange(sender){
  this.this$0.hue = ~~Math.max(Math.min(this.val$sb.curValue, 2147483647), -2147483648);
  $setColor(this.val$cb, this.this$0.hue, this.this$0.sat);
  $setColor(this.val$cdb, this.this$0.hue, this.this$0.sat);
  this.val$cbt.element.innerHTML = ('Button b = new Button("Custom Color Button");<br>b.setColor(' + this.this$0.hue + ',' + this.this$0.sat + ');').fixed() || '';
  this.val$cdbt.element.innerHTML = ('Button b = new Button("Custom Color Disabled Button");<br>b.setColor(' + this.this$0.hue + ',' + this.this$0.sat + ');<br>b.setEnabled(false);').fixed() || '';
}

function ButtonDemo$3(){
}

_ = ButtonDemo$3.prototype = new Object_0();
_.onChange = onChange;
_.typeId$ = 64;
_.this$0 = null;
_.val$cb = null;
_.val$cbt = null;
_.val$cdb = null;
_.val$cdbt = null;
_.val$sb = null;
function $ButtonDemo$4(this$static, this$0, val$sbs, val$cb, val$cdb, val$cbt, val$cdbt){
  this$static.this$0 = this$0;
  this$static.val$sbs = val$sbs;
  this$static.val$cb = val$cb;
  this$static.val$cdb = val$cdb;
  this$static.val$cbt = val$cbt;
  this$static.val$cdbt = val$cdbt;
  return this$static;
}

function onChange_0(sender){
  this.this$0.sat = ~~Math.max(Math.min(this.val$sbs.curValue, 2147483647), -2147483648);
  $setColor(this.val$cb, this.this$0.hue, this.this$0.sat);
  $setColor(this.val$cdb, this.this$0.hue, this.this$0.sat);
  this.val$cbt.element.innerHTML = ('Button b = new Button("Custom Color Button");<br>b.setColor(' + this.this$0.hue + ',' + this.this$0.sat + ');').fixed() || '';
  this.val$cdbt.element.innerHTML = ('Button b = new Button("Custom Color Disabled Button");<br>b.setColor(' + this.this$0.hue + ',' + this.this$0.sat + ');<br>b.setEnabled(false);').fixed() || '';
}

function ButtonDemo$4(){
}

_ = ButtonDemo$4.prototype = new Object_0();
_.onChange = onChange_0;
_.typeId$ = 65;
_.this$0 = null;
_.val$cb = null;
_.val$cbt = null;
_.val$cdb = null;
_.val$cdbt = null;
_.val$sbs = null;
function $ButtonDemo$5(this$static, val$sr, val$rb, val$rbt){
  this$static.val$sr = val$sr;
  this$static.val$rb = val$rb;
  this$static.val$rbt = val$rbt;
  return this$static;
}

function onChange_1(sender){
  var s;
  s = ~~Math.max(Math.min(this.val$sr.curValue, 2147483647), -2147483648);
  this.val$rb.element.style['fontSize'] = s + '%';
  this.val$rbt.element.innerHTML = ('b.setSize(' + s + '); // size is in percentage.').fixed() || '';
}

function ButtonDemo$5(){
}

_ = ButtonDemo$5.prototype = new Object_0();
_.onChange = onChange_1;
_.typeId$ = 66;
_.val$rb = null;
_.val$rbt = null;
_.val$sr = null;
function formatLabel_0(slider, value){
  return '' + value;
}

function ButtonDemo$6(){
}

_ = ButtonDemo$6.prototype = new Object_0();
_.formatLabel = formatLabel_0;
_.typeId$ = 0;
function $ButtonDemo$7(this$static, this$0, val$srr, val$rb, val$rrbt){
  this$static.this$0 = this$0;
  this$static.val$srr = val$srr;
  this$static.val$rb = val$rb;
  this$static.val$rrbt = val$rrbt;
  return this$static;
}

function onChange_2(sender){
  this.this$0.ratio = toDouble(fromDouble(Math.round(this.val$srr.curValue * 10))) / 10;
  $setSizeRatio(this.val$rb, this.this$0.ratio, this.this$0.padding);
  this.val$rrbt.element.innerHTML = ('b.setSizeRatio(' + this.this$0.ratio + ', ' + this.this$0.padding + '); // ratio and padding in em.').fixed() || '';
}

function ButtonDemo$7(){
}

_ = ButtonDemo$7.prototype = new Object_0();
_.onChange = onChange_2;
_.typeId$ = 67;
_.this$0 = null;
_.val$rb = null;
_.val$rrbt = null;
_.val$srr = null;
function $ButtonDemo$8(this$static, this$0, val$sp, val$rb, val$rrbt){
  this$static.this$0 = this$0;
  this$static.val$sp = val$sp;
  this$static.val$rb = val$rb;
  this$static.val$rrbt = val$rrbt;
  return this$static;
}

function onChange_3(sender){
  this.this$0.padding = ~~Math.max(Math.min(this.val$sp.curValue, 2147483647), -2147483648);
  $setSizeRatio(this.val$rb, this.this$0.ratio, this.this$0.padding);
  this.val$rrbt.element.innerHTML = ('b.setSizeRatio(' + this.this$0.ratio + ', ' + this.this$0.padding + '); // ratio and padding in em.').fixed() || '';
}

function ButtonDemo$8(){
}

_ = ButtonDemo$8.prototype = new Object_0();
_.onChange = onChange_3;
_.typeId$ = 68;
_.this$0 = null;
_.val$rb = null;
_.val$rrbt = null;
_.val$sp = null;
function $RatingDemo(this$static){
  var fp1, lbl1, lbl2, rw1, rw2, rw3, rw4, rw5, rw6;
  this$static.ft = $FlexTable(new FlexTable());
  $initWidget(this$static, this$static.ft);
  this$static.ft.tableElem['cellPadding'] = 5;
  $addRating(this$static, $Rating(new Rating(), 4, 10), 'Default Rating Widget.', 'new Rating(4, 10);');
  $addRating(this$static, $Rating_0(new Rating(), 4, 10, 2), 'Rating Widget Right To Left.', 'new Rating(4, 10, Rating.RTL);');
  $addRating(this$static, $Rating_0(new Rating(), 2, 5, 4), 'Rating Widget Top To Bottom.', 'new Rating(2, 5, Rating.TTB);');
  $addRating(this$static, $Rating_0(new Rating(), 4, 5, 8), 'Rating Widget Bottom To Top.', 'new Rating(4, 5, Rating.BTT);');
  $addRating(this$static, $Rating(new Rating(), 0, 10), 'No default selection.', 'new Rating(0, 10);');
  rw1 = $Rating(new Rating(), 4, 10);
  $setReadOnly(rw1, true);
  $addRating(this$static, rw1, 'Rating Widget is read only.', 'Rating rw1 = new Rating(4, 10);<br>rw1.setReadOnly(true);');
  rw2 = $Rating(new Rating(), 8, 10);
  rw2.selectedVisible = false;
  $addRating(this$static, rw2, 'Rating Widget hides current selection on hover.', 'Rating rw2 = new Rating(8, 10);<br>rw2.setSelectedVisibileOnHover(false);');
  rw3 = $Rating_1(new Rating(), 7, 10, 1, 'cbg-star.png', 'cbg-stardeselected.png', '', 16, 16);
  $addRating(this$static, rw3, 'No different image on hover.', 'Rating rw3 = new Rating(7, 10, Rating.LTR,<br>"cbg-star.png", "cbg-stardeselected.png", "", "16px", "16px");<br>');
  rw4 = $Rating(new Rating(), 4, 5);
  $setTitles(rw4, initValues(_3Ljava_lang_String_2_classLit, 0, 1, ['worst', 'worse', 'neutral', 'better', 'best']));
  $addRating(this$static, rw4, 'Rating widget with different title on hover each item.', 'Rating rw4 = new Rating(4, 5);<br>rw4.setTitles(new String[]{"worst","worse","neutral","good","best"});');
  rw6 = $Rating_1(new Rating(), 7, 10, 1, 'ruby.png', 'rubydeselected.png', 'rubyhover.png', 16, 16);
  $addRating(this$static, rw6, 'Rating Widget with custom images.', 'Rating rw6 = new Rating(7, 10, Rating.LTR,<br>"ruby.png", "rubydeselected.png", "rubyhover.png", "16px", "16px");<br>');
  rw5 = $Rating(new Rating(), 4, 5);
  lbl1 = $Label(new Label());
  lbl2 = $Label_1(new Label(), 'selected: ' + rw5.currentRating);
  $addRatingListerner(rw5, $RatingDemo$1(new RatingDemo$1(), lbl1, lbl2));
  fp1 = $FlowPanel(new FlowPanel());
  fp1.element['className'] = 'cbg-ratingwithtext';
  fp1.add_1(rw5);
  fp1.add_1(lbl1);
  lbl2.element.style['clear'] = 'both';
  lbl2.element.style['textAlign'] = 'left';
  fp1.add_1(lbl2);
  $addRating(this$static, fp1, 'Rating Widget with listener and only allows 1 click.', 'final Rating rw5 = new Rating(4, 5);<br>final Label lbl1 = new Label();<br>final Label lbl2 = new Label("selected: " + rw5.getRating());<br>CSS.setProperty(lbl2, CSS.A.CLEAR, CSS.V.CLEAR.BOTH);<br>CSS.setProperty(lbl2, CSS.A.TEXT_ALIGN, CSS.V.TEXT_ALIGN.LEFT);<br>rw5.addRatingListerner(new RatingListener() {<br>  public void onHover(Rating sender, int index) {<br>    lbl1.setText(index > -1 ? ""  + index : "");<br>  }<br>  public void onSelect(Rating sender, int index) {<br>    lbl2.setText("you selected: " + index);<br>    onHover(sender, -1);<br>    sender.setReadOnly(true);<br>  }<br>});<br>FlowPanel fp1 = new FlowPanel();<br>fp1.add(rw5);<br>fp1.add(lbl1);<br>fp1.add(lbl2);<br>');
  return this$static;
}

function $addRating(this$static, w, title, code){
  $setHTML(this$static.ft, this$static.row, 0, title);
  $getElement(this$static.ft.cellFormatter, this$static.row, 0).style['fontWeight'] = 'bold';
  $getElement(this$static.ft.cellFormatter, this$static.row, 0).colSpan = 2;
  $setWidget(this$static.ft, ++this$static.row, 0, w);
  $setHTML(this$static.ft, this$static.row, 1, code.fixed());
  $setVerticalAlign(this$static.ft.rowFormatter, this$static.row++, ($clinit_71() , ALIGN_MIDDLE));
}

function RatingDemo(){
}

_ = RatingDemo.prototype = new Composite();
_.typeId$ = 69;
_.row = 0;
function $RatingDemo$1(this$static, val$lbl1, val$lbl2){
  this$static.val$lbl1 = val$lbl1;
  this$static.val$lbl2 = val$lbl2;
  return this$static;
}

function $onHover(this$static, index){
  $setInnerText(this$static.val$lbl1.element, index > -1?'' + index:'');
}

function $onSelect(this$static, sender, index){
  $setInnerText(this$static.val$lbl2.element, 'you selected: ' + index);
  $setInnerText(this$static.val$lbl1.element, '');
  $setReadOnly(sender, true);
}

function RatingDemo$1(){
}

_ = RatingDemo$1.prototype = new Object_0();
_.typeId$ = 70;
_.val$lbl1 = null;
_.val$lbl2 = null;
function $RoundedPanelDemo(this$static){
  var fp1, l1, l2, la, la_0, la_1, la_2;
  $FlowPanel(new FlowPanel());
  this$static.ft = $FlexTable(new FlexTable());
  $initWidget(this$static, this$static.ft);
  this$static.ft.tableElem['cellPadding'] = 5;
  $addRoundedPanel(this$static, 'RoundedPanel default', '#FAD163', 15, 2, null, '<pre>RoundedPanel rp = new RoundedPanel();\nrp.setCornerColor(#FAD163);<\/pre>');
  $addRoundedPanel(this$static, 'RoundedPanel rounded on the right side', '#7fff00', 10, 2, null, '<pre>RoundedPanel rp = new RoundedPanel(RoundedCorners.RIGHT);\nrp.setCornerColor(Color.CHARTREUSE);<\/pre>');
  $addRoundedPanel(this$static, 'RoundedPanel 5 high', '#ffb6c1', 3, 5, null, '<pre>RoundedPanel rp = new RoundedPanel(RoundedCorners.TOP, 5);\nrp.setCornerColor(Color.DARKOLIVEGREEN);<\/pre>');
  $addRoundedPanel(this$static, 'RoundedPanel 9 high', '#ffa07a', 15, 9, null, '<pre>RoundedPanel rp = new RoundedPanel(RoundedPanel.ALL, 9);\nrp.setCornerColor(Color.CHARTREUSE);<\/pre>');
  $addRoundedPanel(this$static, 'RoundedPanel 3 high with border', '#ffb6c1', 15, 3, '#b22222', '<pre>RoundedPanel rp = new RoundedPanel(RoundedCorners.BOTTOM, 3);\nrp.setBorderColor(Color.FIREBRICK);<\/pre>');
  la = $Label_1(new Label(), 'RoundedLinePanel default');
  la.element.style['backgroundColor'] = '#add8e6';
  $addRoundedLinePanel(this$static, '#00008b', '#add8e6', '#add8e6', 15, 2, la, '<pre>RoundedLinePanel  rp = new RoundedLinePanel ();\nrp.setCornerColor(Color.DARKBLUE, Color.LIGHTBLUE);<\/pre>');
  la_0 = $Label_1(new Label(), 'left side rounded RoundedLinePanel');
  la_0.element.style['backgroundColor'] = '#add8e6';
  $addRoundedLinePanel(this$static, '#00008b', '#add8e6', '#add8e6', 5, 2, la_0, '<pre>RoundedLinePanel  rp = new RoundedLinePanel (RoundedPanel.LEFT);\nrp.setCornerColor(Color.DARKBLUE, Color.LIGHTBLUE);<\/pre>');
  la_1 = $Label_1(new Label(), 'RoundedLinePanel 5 high');
  la_1.element.style['backgroundColor'] = '#add8e6';
  $addRoundedLinePanel(this$static, '#00008b', '#add8e6', '#add8e6', 12, 5, la_1, '<pre>RoundedLinePanel  rp = new RoundedLinePanel (RoundedPanel.BOTTOM, 5);\nrp.setCornerColor(Color.DARKBLUE, Color.LIGHTBLUE);<\/pre>');
  la_2 = $Label_1(new Label(), 'RoundedLinePanel 9 high');
  la_2.element.style['backgroundColor'] = '#add8e6';
  $addRoundedLinePanel(this$static, '#00008b', '#add8e6', '#add8e6', 15, 9, la_2, '<pre>RoundedLinePanel rp = new RoundedLinePanel(RoundedPanel.ALL, 9);\nrp.setCornerColor(Color.DARKBLUE, Color.LIGHTBLUE, Color.LIGHTBLUE);\n<\/pre>');
  l1 = $Label_1(new Label(), 'RoundedLinePanel');
  l1.element.style['backgroundColor'] = '#ff8c00';
  l2 = $Label_1(new Label(), 'split color');
  l2.element.style['backgroundColor'] = 'orange';
  fp1 = $FlowPanel(new FlowPanel());
  fp1.add_1(l1);
  fp1.add_1(l2);
  $addRoundedLinePanel(this$static, '#a52a2a', '#ff8c00', 'orange', 15, 4, fp1, 'RoundedLinePanel rp = new RoundedLinePanel(RoundedPanel.ALL, 9);\nrp.setCornerColor(Color.BROWN, Color.DARKORANGE, Color.ORANGE);\n'.fixed());
  return this$static;
}

function $addRoundedLinePanel(this$static, outerColor, innerColor, innerBottom, corners, height, w, code){
  var rp;
  rp = $RoundedLinePanel(new RoundedLinePanel(), w, corners, height);
  rp.element.style['width'] = '300px';
  rp.element.style['textAlign'] = 'center';
  $setCornerColor(rp, outerColor, innerColor, innerBottom);
  rp.element.style['overflow'] = 'visible';
  $setWidget(this$static.ft, this$static.row, 0, rp);
  $setHTML(this$static.ft, this$static.row, 1, code);
  $setVerticalAlign(this$static.ft.rowFormatter, this$static.row++, ($clinit_71() , ALIGN_MIDDLE));
}

function $addRoundedPanel(this$static, text, bgColor, corners, height, borderColor, code){
  var la, rp;
  la = $Label_1(new Label(), text);
  la.element.style['backgroundColor'] = bgColor;
  rp = $RoundedPanel_0(new RoundedPanel(), la, corners, height);
  if (borderColor != null) {
    $setCornerColor_0(rp, borderColor);
    $setBorderContainer(rp, borderColor, ($clinit_186() , CORNERMARGIN)[rp.cornerHeight - 1][rp.cornerHeight - 1]);
  }
   else {
    $setCornerColor_0(rp, bgColor);
  }
  rp.element.style['textAlign'] = 'center';
  $setWidget(this$static.ft, this$static.row, 0, rp);
  $setHTML(this$static.ft, this$static.row, 1, code);
  $setVerticalAlign(this$static.ft.rowFormatter, this$static.row++, ($clinit_71() , ALIGN_MIDDLE));
}

function RoundedPanelDemo(){
}

_ = RoundedPanelDemo.prototype = new Composite();
_.typeId$ = 71;
_.row = 0;
function $TagsDemo(this$static){
  var fp, sp, sp1, span, textNode;
  fp = $FlowPanel(new FlowPanel());
  $initWidget(this$static, fp);
  span = $Span_0(new Span(), 'This text is placed on a Span Widget. The Span Widget is implemented as a HTML Widget, but instead of a DIV it uses a SPAN tag as basis.');
  sp1 = $SimplePanel(new SimplePanel());
  $setWidget_0(sp1, span);
  fp.add_1(sp1);
  sp1.element.style['backgroundColor'] = '#87cefa';
  span.element.style['backgroundColor'] = '#e6e6fa';
  sp1.element.style['padding'] = 15 + 'px';
  textNode = $TextNode(new TextNode(), 'This text is generated with the TextNode Widget. A TextNode Widget is a simple widget to add plain text between other widgets without any overhead of a wrapped div or span tag.');
  sp = $SimplePanel(new SimplePanel());
  $setWidget_0(sp, textNode);
  sp.element.style['backgroundColor'] = '#87cefa';
  fp.add_1(sp);
  sp.element.style['marginTop'] = 15 + 'px';
  return this$static;
}

function TagsDemo(){
}

_ = TagsDemo.prototype = new Composite();
_.typeId$ = 72;
function $onHistoryChanged(this$static, historyToken){
  if (this$static.w) {
    $remove_0(($clinit_85() , get_0(null)), this$static.w);
  }
  if ($equals_0('RatingWidget', historyToken) || $equals_0('Rating', historyToken)) {
    this$static.w = $RatingDemo(new RatingDemo());
  }
   else if ($equals_0('Tags', historyToken)) {
    this$static.w = $TagsDemo(new TagsDemo());
  }
   else if ($equals_0('Button', historyToken)) {
    this$static.w = $ButtonDemo(new ButtonDemo());
  }
   else {
    this$static.w = $RoundedPanelDemo(new RoundedPanelDemo());
  }
  if (this$static.w) {
    $add(($clinit_85() , get_0(null)), this$static.w);
  }
}

function $onModuleLoad(this$static){
  var initToken;
  $clinit_32();
  $clinit_42();
  $add_3(historyListeners, this$static);
  initToken = impl?$wnd.__gwt_historyToken || '':'';
  if (initToken.length > 0) {
    $onHistoryChanged(this$static, initToken);
  }
   else {
    $onHistoryChanged(this$static, 'RoundedPanel');
  }
}

function WidgetsDemo(){
}

_ = WidgetsDemo.prototype = new Object_0();
_.typeId$ = 73;
_.w = null;
function $fireClickEvent(element){
  var evObj = $doc.createEvent('MouseEvents');
  evObj.initEvent('click', true, true);
  element.dispatchEvent(evObj);
}

function $Color(this$static, r, g, b){
  this$static.red = r;
  this$static.green = g;
  this$static.blue = b;
  return this$static;
}

function $toRGBString(this$static){
  return 'rgb(' + this$static.red + ',' + this$static.green + ',' + this$static.blue + ')';
}

function HSBtoRGB(hue, saturation, brightness){
  var b, f, g, h, p, q, r, t;
  r = 0;
  g = 0;
  b = 0;
  brightness = ~~Math.max(Math.min(brightness * 2.55, 2147483647), -2147483648);
  if (saturation == 0) {
    r = g = b = brightness;
  }
   else {
    h = hue / 60;
    f = h - Math.floor(h);
    p = ~~(brightness * (100 - saturation) / 100);
    q = ~~Math.max(Math.min(brightness * (100 - saturation * f) / 100, 2147483647), -2147483648);
    t = ~~(~~Math.max(Math.min(brightness * (100 - saturation * (1 - f)), 2147483647), -2147483648) / 100);
    switch (~~Math.max(Math.min(h, 2147483647), -2147483648)) {
      case 0:
        r = brightness;
        g = t;
        b = p;
        break;
      case 1:
        r = q;
        g = brightness;
        b = p;
        break;
      case 2:
        r = p;
        g = brightness;
        b = t;
        break;
      case 3:
        r = p;
        g = q;
        b = brightness;
        break;
      case 4:
        r = t;
        g = p;
        b = brightness;
        break;
      case 5:
        r = brightness;
        g = p;
        b = q;
    }
  }
  return $Color(new Color(), r, g, b);
}

function Color(){
}

_ = Color.prototype = new Object_0();
_.typeId$ = 0;
_.blue = 0;
_.green = 0;
_.red = 0;
function $Button_0(this$static, html){
  $FocusWidget(this$static, $doc.createElement('div'));
  sinkEvents(this$static.element, 7165 | (this$static.element.__eventBits || 0));
  this$static.element['className'] = 'cbg-Button';
  this$static.element.style['display'] = 'inline-block';
  this$static.element.style['outline'] = 'none';
  this$static.element.style['padding'] = 0 + 'px';
  this$static.element.style['position'] = 'relative';
  this$static.element.style['textDecoration'] = 'none';
  this$static.element.style['verticalAlign'] = 'middle';
  this$static.element['unselectable'] = 'on';
  this$static.element.setAttribute('role', 'button');
  this$static.outer = $doc.createElement('div');
  this$static.element.appendChild(this$static.outer);
  this$static.outer['className'] = 'cbg-ButtonOuter';
  this$static.outer.style['display'] = 'inline-block';
  this$static.outer.style['borderStyle'] = 'solid';
  this$static.outer.style['borderWidth'] = '1px 0';
  this$static.outer.style['lineHeight'] = 0 + 'px';
  this$static.outer.style['margin'] = 0 + 'px';
  this$static.outer.style['padding'] = 0 + 'px';
  this$static.outer.style['position'] = 'relative';
  this$static.outer['unselectable'] = 'on';
  this$static.inner = $doc.createElement('div');
  this$static.outer.appendChild(this$static.inner);
  this$static.inner['className'] = 'cbg-ButtonInner';
  this$static.inner.style['display'] = 'inline-block';
  this$static.inner.style['cssFloat'] = 'left';
  this$static.inner.style['borderStyle'] = 'solid';
  this$static.inner.style['borderWidth'] = '0 1px';
  this$static.inner.style['lineHeight'] = 'normal';
  this$static.inner.style['margin'] = '0 -1px';
  this$static.inner.style['overflow'] = 'hidden';
  this$static.inner.style['position'] = 'relative';
  this$static.inner['unselectable'] = 'on';
  this$static.buttonTop = $doc.createElement('div');
  this$static.inner.appendChild(this$static.buttonTop);
  this$static.buttonTop.style['width'] = '100%';
  this$static.buttonTop['className'] = 'cbg-ButtonTop';
  this$static.buttonTop.style['borderBottomStyle'] = 'solid';
  this$static.buttonTop.style['left'] = 0 + 'px';
  this$static.buttonTop.style['overflow'] = 'hidden';
  this$static.buttonTop.style['position'] = 'absolute';
  this$static.buttonTop.style['right'] = 0 + 'px';
  this$static.buttonTop.style['top'] = 0 + 'px';
  this$static.buttonContent = $doc.createElement('div');
  this$static.inner.appendChild(this$static.buttonContent);
  this$static.buttonContent['className'] = 'cbg-ButtonContent';
  this$static.buttonContent.style['position'] = 'relative';
  this$static.buttonContent.style['textAlign'] = 'center';
  this$static.buttonContent.style['verticalAlign'] = 'middle';
  this$static.buttonContent.style['whiteSpace'] = 'nowrap';
  this$static.buttonContent['unselectable'] = 'on';
  $setEnabled(this$static, true);
  this$static.element.style['fontSize'] = '70%';
  $setSizeRatio(this$static, 1, 8);
  this$static.element.style['fontFamily'] = 'Arial, Helvetica, sans-serif';
  $setColor(this$static, 0, 0);
  this$static.buttonContent.innerHTML = html || '';
  $setTitle(this$static, html);
  return this$static;
}

function $onActive(this$static, active){
  if (!this$static.active || !active) {
    setStyleName(this$static.element, 'cbg-active', active);
    if (this$static.customColor) {
      this$static.buttonTop.style['backgroundColor'] = active?this$static.colorContentBottom:this$static.colorContentTop;
      this$static.inner.style['backgroundColor'] = active?this$static.colorContentTop:this$static.colorContentBottom;
    }
    this$static.element.setAttribute('aria-pressed', active?'true':'false');
    this$static.active = active;
  }
}

function $onFocus(this$static, set, style, color){
  setStyleName(this$static.element, style, set);
  if (this$static.customColor) {
    this$static.outer.style['borderColor'] = set?color:this$static.colorBorder;
    this$static.inner.style['borderColor'] = set?color:this$static.colorBorder;
    if (this$static.colorBorderLeft != null && !set) {
      this$static.inner.style['borderLeftColor'] = this$static.colorBorderLeft;
    }
    if (this$static.colorBorderRight != null && !set) {
      this$static.inner.style['borderRightColor'] = this$static.colorBorderRight;
    }
  }
  if (!set) {
    $onActive(this$static, false);
  }
}

function $onHover_0(this$static, hover){
  if (!this$static.hasFocus) {
    $onFocus(this$static, hover, 'cbg-hover', this$static.colorBorderHover);
  }
}

function $setColor(this$static, hue, saturation){
  var satof, sg;
  this$static.customColor = true;
  satof = ~~Math.max(Math.min(saturation * 0.03, 2147483647), -2147483648);
  this$static.colorBorderFocus = $toRGBString(HSBtoRGB(hue, saturation, 27 - satof));
  this$static.colorBorderHover = $toRGBString(HSBtoRGB(hue, saturation, 58 - satof));
  this$static.colorBorder = $toRGBString(HSBtoRGB(hue, saturation, 74 - satof));
  this$static.colorContentTop = $toRGBString(HSBtoRGB(hue, saturation, 98 - satof));
  this$static.colorContentMid = $toRGBString(HSBtoRGB(hue, saturation, 93 - 3 * satof));
  this$static.colorContentBottom = $toRGBString(HSBtoRGB(hue, saturation, 89 - 6 * satof));
  this$static.outer.style['borderColor'] = this$static.colorBorder;
  this$static.inner.style['borderColor'] = this$static.colorBorder;
  if (this$static.colorBorderLeft != null) {
    this$static.inner.style['borderLeftColor'] = this$static.colorBorderLeft;
  }
  if (this$static.colorBorderRight != null) {
    this$static.colorBorderRight = this$static.colorBorder;
  }
  this$static.buttonTop.style['borderBottomColor'] = this$static.colorContentMid;
  this$static.buttonTop.style['backgroundColor'] = this$static.colorContentTop;
  this$static.inner.style['backgroundColor'] = this$static.colorContentBottom;
  sg = saturation > 50;
  this$static.colorText = sg?'white':'black';
  this$static.colorDisabled = $toRGBString(HSBtoRGB(hue, sg?~~(saturation / 2):saturation, sg?94:53));
  this$static.buttonContent.style['color'] = this$static.enabled?this$static.colorText:this$static.colorDisabled;
}

function $setEnabled(this$static, enabled){
  this$static.enabled = enabled;
  setStyleName(this$static.element, 'cbg-disabled', !enabled);
  this$static.element.style['cursor'] = enabled?'pointer':'default';
  $setTabIndex_0(this$static, enabled?this$static.tabIndex_0:-1);
  if (this$static.customColor) {
    this$static.buttonContent.style['color'] = this$static.enabled?this$static.colorText:this$static.colorDisabled;
  }
  if (enabled) {
    this$static.element.removeAttribute('aria-disabled');
  }
   else {
    this$static.element.setAttribute('aria-disabled', 'true');
  }
}

function $setInnerBorderColor(this$static, set, leftBorder){
  if (this$static.customColor) {
    if (leftBorder) {
      this$static.colorBorderLeft = set?'white':null;
      this$static.inner.style['borderLeftColor'] = set?this$static.colorBorderLeft:this$static.colorBorder;
    }
     else {
      this$static.colorBorderRight = set?this$static.colorBorder:null;
    }
  }
  this$static.inner.style[leftBorder?'marginLeft':'marginRight'] = (set?0:-1) + 'px';
}

function $setSizeRatio(this$static, ratio, padding){
  this$static.buttonTop.style['borderBottomWidth'] = ratio * 0.2 + 'em';
  this$static.buttonTop.style['height'] = ratio * 0.9 + 'em';
  this$static.buttonContent.style['padding'] = '0 ' + padding + 'px';
  this$static.buttonContent.style['lineHeight'] = ratio * 1.8 + 'em';
}

function $setTabIndex_0(this$static, index){
  this$static.tabIndex_0 = index;
  this$static.element.tabIndex = index;
}

function onBrowserEvent_7(event_0){
  var kd, ku;
  if (!this.enabled) {
    event_0.preventDefault();
    return;
  }
  switch ($eventGetTypeInt(event_0)) {
    case 1:
      $onActive(this, false);
      break;
    case 4096:
      this.hasFocus = false;
      $onFocus(this, false, 'cbg-focus', this.colorBorderFocus);
      break;
    case 2048:
      this.hasFocus = true;
      $onFocus(this, true, 'cbg-focus', this.colorBorderFocus);
      break;
    case 128:
      kd = event_0.which || (event_0.keyCode || 0);
      if (kd == 32 || kd == 13) {
        $onActive(this, true);
      }

      break;
    case 512:
      ku = event_0.which || (event_0.keyCode || 0);
      if (ku == 32 || ku == 13) {
        $fireClickEvent(this.element);
      }

      $onActive(this, false);
      break;
    case 8:
      $onActive(this, false);
      break;
    case 4:
      if (1 == $eventGetButton(event_0)) {
        $setFocus_0(this, true);
        $onActive(this, true);
      }
       else {
        event_0.preventDefault();
        return;
      }

      break;
    case 16:
      $onHover_0(this, true);
      break;
    case 32:
      $onHover_0(this, false);
      $onActive(this, false);
  }
  $onBrowserEvent(this, event_0);
}

function Button(){
}

_ = Button.prototype = new FocusWidget();
_.onBrowserEvent = onBrowserEvent_7;
_.typeId$ = 74;
_.active = false;
_.buttonContent = null;
_.buttonTop = null;
_.colorBorder = '';
_.colorBorderFocus = null;
_.colorBorderHover = null;
_.colorBorderLeft = null;
_.colorBorderRight = null;
_.colorContentBottom = null;
_.colorContentMid = null;
_.colorContentTop = null;
_.colorDisabled = null;
_.colorText = null;
_.customColor = false;
_.enabled = true;
_.hasFocus = false;
_.inner = null;
_.outer = null;
_.tabIndex_0 = 0;
function $ButtonBar(this$static){
  $FlowPanel(this$static);
  this$static.element.style['display'] = 'inline-block';
  this$static.element['className'] = 'cbg-ButtonBar';
  return this$static;
}

function $add_5(this$static, button){
  var left, wc;
  $add_0(this$static, button, this$static.element);
  wc = this$static.children.size;
  if (wc > 1) {
    $setInnerBorderColor(button, true, true);
    setStyleName(button.element, 'cbg-BCLeft', true);
    left = $get(this$static.children, wc - 2);
    if (left != null && canCast(left.typeId$, 29)) {
      $setInnerBorderColor(dynamicCast(left, 29), true, false);
    }
    setStyleName(left.element, 'cbg-BCRight', true);
  }
}

function $remove_8(this$static, index){
  var cnt, left, present, right;
  present = $remove_1(this$static, $get(this$static.children, index));
  if (present) {
    cnt = this$static.children.size;
    if (cnt > 0) {
      if (index == 0) {
        right = $get(this$static.children, 0);
        if (right != null && canCast(right.typeId$, 29)) {
          $setInnerBorderColor(dynamicCast(right, 29), false, true);
        }
        setStyleName(right.element, 'cbg-BCLeft', false);
      }
       else if (index == cnt) {
        left = $get(this$static.children, index - 1);
        if (left != null && canCast(left.typeId$, 29)) {
          $setInnerBorderColor(dynamicCast(left, 29), false, false);
        }
        setStyleName(left.element, 'cbg-BCLeft', false);
      }
    }
  }
  return present;
}

function add_7(w){
  $add_0(this, w, this.element);
  w.element.style['display'] = 'inline-block';
}

function ButtonBar(){
}

_ = ButtonBar.prototype = new FlowPanel();
_.add_1 = add_7;
_.typeId$ = 75;
function $Link(this$static, url, text){
  this$static.element = $doc.createElement('a');
  this$static.element['className'] = 'cbg-Link';
  this$static.element.href = url;
  $setInnerText(this$static.element, text);
  return this$static;
}

function Link(){
}

_ = Link.prototype = new Widget();
_.typeId$ = 76;
function $Rating(this$static, initRating, maxRating){
  $Rating_1(this$static, initRating, maxRating, 1, 'cbg-star.png', 'cbg-stardeselected.png', 'cbg-starhover.png', 16, 16);
  return this$static;
}

function $Rating_0(this$static, initRating, maxRating, orientation){
  $Rating_1(this$static, initRating, maxRating, orientation, 'cbg-star.png', 'cbg-stardeselected.png', 'cbg-starhover.png', 16, 16);
  return this$static;
}

function $Rating_1(this$static, initRating, maxRating, orientation, selectedImg, deselectedImg, hoverImg, width, height){
  var i, mlt, offset;
  this$static.panel = $FlowPanel(new FlowPanel());
  $initWidget(this$static, this$static.panel);
  this$static.currentRating = initRating;
  this$static.selectedVisible = !$equals_0('', hoverImg);
  this$static.element['className'] = 'cbg-Rating';
  this$static.element.style['cursor'] = 'pointer';
  offset = (orientation & 5) > 0?1:maxRating;
  mlt = (orientation & 5) > 0?1:-1;
  for (i = 0; i < maxRating; ++i) {
    this$static.panel.add_1($Rating$RatingItem(new Rating$RatingItem(), offset + mlt * i, orientation, selectedImg, deselectedImg, hoverImg, width, height, this$static));
  }
  $setItemsState(this$static, -1);
  return this$static;
}

function $addRatingListerner(this$static, listener){
  if (!this$static.ratingListeners) {
    this$static.ratingListeners = $ArrayList(new ArrayList());
  }
  $add_3(this$static.ratingListeners, listener);
}

function $onHover_1(this$static, index){
  var it;
  if (!this$static.readOnly) {
    $setItemsState(this$static, index);
    if (this$static.ratingListeners) {
      for (it = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), this$static.ratingListeners); it.i < it.this$0.size_0();) {
        $onHover(dynamicCast($next_1(it), 31), index);
      }
    }
  }
}

function $onSelect_0(this$static, index){
  var it;
  if (!this$static.readOnly) {
    this$static.currentRating = index;
    $setItemsState(this$static, -1);
    if (this$static.ratingListeners) {
      for (it = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), this$static.ratingListeners); it.i < it.this$0.size_0();) {
        $onSelect(dynamicCast($next_1(it), 31), this$static, index);
      }
    }
  }
}

function $setItemsState(this$static, hoverIndex){
  var i, sw;
  i = $WidgetCollection$WidgetIterator(new WidgetCollection$WidgetIterator(), this$static.panel.children);
  while (i.index < i.this$0.size - 1) {
    sw = dynamicCast($next_0(i), 30);
    if (sw.index <= hoverIndex) {
      sw.element.style['backgroundImage'] = sw.hoverImg;
    }
     else if ((hoverIndex == -1 || this$static.selectedVisible) && sw.index <= this$static.currentRating) {
      sw.element.style['backgroundImage'] = sw.selectedImg;
    }
     else {
      sw.element.style['backgroundImage'] = sw.deselectedImg;
    }
  }
}

function $setReadOnly(this$static, readOnly){
  this$static.readOnly = readOnly;
  if (readOnly) {
    $setItemsState(this$static, -1);
  }
  this$static.element.style['cursor'] = readOnly?'':'pointer';
}

function $setTitles(this$static, titles){
  var i, idx, sw;
  i = $WidgetCollection$WidgetIterator(new WidgetCollection$WidgetIterator(), this$static.panel.children);
  idx = 0;
  while (i.index < i.this$0.size - 1) {
    sw = dynamicCast($next_0(i), 30);
    $setTitle(sw, titles[idx++]);
  }
}

function Rating(){
}

_ = Rating.prototype = new Composite();
_.typeId$ = 77;
_.currentRating = 0;
_.ratingListeners = null;
_.readOnly = false;
_.selectedVisible = false;
function $Rating$RatingItem(this$static, index, orientation, selectedImg, deselectedImg, hoverImg, width, height, this$0){
  var star;
  this$static.this$0 = this$0;
  star = $doc.createElement('span');
  this$static.element = star;
  sinkEvents(this$static.element, 125 | (this$static.element.__eventBits || 0));
  this$static.index = index;
  this$static.deselectedImg = 'url(' + deselectedImg + ')';
  this$static.selectedImg = 'url(' + selectedImg + ')';
  this$static.hoverImg = $equals_0('', hoverImg)?this$static.selectedImg:'url(' + hoverImg + ')';
  if ((orientation & 3) > 0) {
    star.style['cssFloat'] = 'left';
  }
  this$static.element['className'] = 'cbg-RatingItem';
  this$static.element.style['width'] = width + 'px';
  this$static.element.style['height'] = height + 'px';
  star.style['fontSize'] = 0 + 'px';
  star.style['backgroundRepeat'] = 'no-repeat';
  star.style['display'] = 'block';
  return this$static;
}

function onBrowserEvent_8(event_0){
  switch ($eventGetTypeInt(event_0)) {
    case 16:
      $onHover_1(this.this$0, this.index);
      break;
    case 32:
      $onHover_1(this.this$0, -1);
      break;
    case 1:
      $onSelect_0(this.this$0, this.index);
  }
}

function Rating$RatingItem(){
}

_ = Rating$RatingItem.prototype = new Widget();
_.onBrowserEvent = onBrowserEvent_8;
_.typeId$ = 78;
_.deselectedImg = null;
_.hoverImg = null;
_.index = 0;
_.selectedImg = null;
_.this$0 = null;
function $clinit_186(){
  $clinit_186 = nullMethod;
  CORNERBORDER = initValues(_3_3I_classLit, 0, 17, [initValues(_3I_classLit, 85, -1, [1]), initValues(_3I_classLit, 85, -1, [1, 1]), initValues(_3I_classLit, 85, -1, [1, 1, 1]), initValues(_3I_classLit, 85, -1, [1, 1, 1, 1]), initValues(_3I_classLit, 85, -1, [1, 1, 1, 2, 1]), initValues(_3I_classLit, 85, -1, [1, 1, 1, 1, 2, 1]), initValues(_3I_classLit, 85, -1, [1, 1, 1, 1, 1, 2, 1]), initValues(_3I_classLit, 85, -1, [1, 1, 1, 1, 1, 2, 2, 1]), initValues(_3I_classLit, 85, -1, [1, 1, 1, 1, 1, 1, 2, 3, 1])]);
  CORNERHEIGHT = initValues(_3_3I_classLit, 0, 17, [initValues(_3I_classLit, 85, -1, [1]), initValues(_3I_classLit, 85, -1, [1, 1]), initValues(_3I_classLit, 85, -1, [1, 1, 1]), initValues(_3I_classLit, 85, -1, [1, 1, 1, 1]), initValues(_3I_classLit, 85, -1, [2, 1, 1, 1, 1]), initValues(_3I_classLit, 85, -1, [2, 1, 1, 1, 1, 1]), initValues(_3I_classLit, 85, -1, [2, 1, 1, 1, 1, 1, 1]), initValues(_3I_classLit, 85, -1, [2, 1, 1, 1, 1, 1, 1, 1]), initValues(_3I_classLit, 85, -1, [3, 2, 1, 1, 1, 1, 1, 1, 1])]);
  CORNERMARGIN = initValues(_3_3I_classLit, 0, 17, [initValues(_3I_classLit, 85, -1, [1]), initValues(_3I_classLit, 85, -1, [1, 2]), initValues(_3I_classLit, 85, -1, [1, 2, 3]), initValues(_3I_classLit, 85, -1, [1, 2, 3, 4]), initValues(_3I_classLit, 85, -1, [1, 2, 3, 4, 6]), initValues(_3I_classLit, 85, -1, [1, 2, 3, 4, 5, 7]), initValues(_3I_classLit, 85, -1, [1, 2, 3, 4, 5, 6, 8]), initValues(_3I_classLit, 85, -1, [1, 2, 3, 4, 5, 6, 8, 10]), initValues(_3I_classLit, 85, -1, [1, 2, 3, 4, 5, 6, 7, 9, 12])]);
}

function $RoundedPanel(this$static, corners, cornerHeight){
  var cb, ct, i;
  $clinit_186();
  $SimplePanel_0(this$static, $doc.createElement('div'));
  this$static.body_0 = this$static.element;
  if (cornerHeight < 1 || cornerHeight > 9) {
    throw new IndexOutOfBoundsException();
  }
  this$static.cornerHeight = cornerHeight;
  this$static.divt = initDim(_3Lcom_google_gwt_core_client_JavaScriptObject_2_classLit, 0, -1, cornerHeight, 0);
  this$static.divb = initDim(_3Lcom_google_gwt_core_client_JavaScriptObject_2_classLit, 0, -1, cornerHeight, 0);
  this$static.corners = corners;
  if ((corners & 3) > 0) {
    ct = corners & 3;
    for (i = 0; i < cornerHeight; ++i) {
      setCheck(this$static.divt, i, $addLine(this$static, ct, cornerHeight - (i + 1)));
    }
  }
  this$static.divElement = $doc.createElement('div');
  this$static.body_0.appendChild(this$static.divElement);
  if ((corners & 12) > 0) {
    cb = corners & 12;
    for (i = cornerHeight - 1; i >= 0; --i) {
      setCheck(this$static.divb, i, $addLine(this$static, cb, cornerHeight - (i + 1)));
    }
  }
  $setCornerStyleName(this$static, 'cbg-RP');
  return this$static;
}

function $RoundedPanel_0(this$static, w, corners, cornerHeight){
  $clinit_186();
  $RoundedPanel(this$static, corners, cornerHeight);
  $setWidget_0(this$static, w);
  return this$static;
}

function $addLine(this$static, corner, heightIndex){
  var div, margin, mw;
  mw = CORNERMARGIN[this$static.cornerHeight - 1][heightIndex] + 'px ';
  margin = '0 ' + ((corner & 10) > 0?mw:'0 ') + '0 ' + ((corner & 5) > 0?mw:'0');
  div = $doc.createElement('div');
  div.style['height'] = CORNERHEIGHT[this$static.cornerHeight - 1][heightIndex] + 'px';
  div.style['borderWidth'] = '0 ' + CORNERBORDER[this$static.cornerHeight - 1][heightIndex] + 'px';
  div.style['margin'] = margin;
  div.style['fontSize'] = 0 + 'px';
  div.style['overflow'] = 'hidden';
  this$static.body_0.appendChild(div);
  return div;
}

function $setBorder_0(elem, corners, borderColor){
  if ((corners & 5) > 0) {
    elem.style['borderLeftStyle'] = 'solid';
    elem.style['borderLeftColor'] = borderColor;
  }
  if ((corners & 10) > 0) {
    elem.style['borderRightStyle'] = 'solid';
    elem.style['borderRightColor'] = borderColor;
  }
}

function $setBorderContainer(this$static, borderColor, borderWidth){
  $setBorder_0(this$static.divElement, this$static.corners, borderColor);
  this$static.divElement.style['borderWidth'] = '0 ' + borderWidth + 'px';
}

function $setCornerColor_0(this$static, borderColor){
  var i;
  if (this$static.divt[0]) {
    for (i = 0; i < this$static.cornerHeight; ++i) {
      this$static.divt[i].style['backgroundColor'] = borderColor;
    }
  }
  if (this$static.divb[0]) {
    for (i = 0; i < this$static.cornerHeight; ++i) {
      this$static.divb[i].style['backgroundColor'] = borderColor;
    }
  }
}

function $setCornerStyleName(this$static, style){
  var i;
  if (this$static.divt[0]) {
    for (i = 0; i < this$static.cornerHeight; ++i) {
      this$static.divt[i].className = style;
    }
  }
  if (this$static.divb[0]) {
    for (i = 0; i < this$static.cornerHeight; ++i) {
      this$static.divb[i].className = style;
    }
  }
}

function getContainerElement_0(){
  return this.divElement;
}

function RoundedPanel(){
}

_ = RoundedPanel.prototype = new SimplePanel();
_.getContainerElement = getContainerElement_0;
_.typeId$ = 79;
_.body_0 = null;
_.cornerHeight = 0;
_.corners = 0;
_.divElement = null;
_.divb = null;
_.divt = null;
var CORNERBORDER, CORNERHEIGHT, CORNERMARGIN;
function $clinit_185(){
  $clinit_185 = nullMethod;
  $clinit_186();
}

function $RoundedLinePanel(this$static, w, corners, cornerHeight){
  $clinit_185();
  $RoundedPanel(this$static, corners, cornerHeight);
  $setWidget_0(this$static, w);
  return this$static;
}

function $setBorder(elem, corners, borderColor, backgroundColor){
  elem.style['backgroundColor'] = backgroundColor;
  $setBorder_0(elem, corners, borderColor);
}

function $setCornerColor(this$static, borderColor, innerTop, innerBottom){
  var i;
  $setBorder_0(this$static.divElement, this$static.corners, borderColor);
  this$static.divElement.style['borderWidth'] = '0 1px';
  if (this$static.divt[0]) {
    this$static.divt[0].style['backgroundColor'] = borderColor;
    for (i = 1; i < this$static.cornerHeight; ++i) {
      $setBorder(this$static.divt[i], this$static.corners & 3, borderColor, innerTop);
    }
  }
  if (this$static.divb[0]) {
    this$static.divb[0].style['backgroundColor'] = borderColor;
    for (i = 1; i < this$static.cornerHeight; ++i) {
      $setBorder(this$static.divb[i], this$static.corners & 12, borderColor, innerBottom);
    }
  }
}

function RoundedLinePanel(){
}

_ = RoundedLinePanel.prototype = new RoundedPanel();
_.typeId$ = 80;
function $Span_0(this$static, text){
  $HTML(this$static, $doc.createElement('span'));
  sinkEvents(this$static.element, 131197 | (this$static.element.__eventBits || 0));
  this$static.element['className'] = 'cbg-Span';
  $setInnerText(this$static.element, text);
  return this$static;
}

function Span(){
}

_ = Span.prototype = new HTML();
_.typeId$ = 81;
function $TextNode(this$static, text){
  this$static.textElement = $doc.createTextNode(text);
  this$static.element = this$static.textElement;
  return this$static;
}

function isAttached_1(){
  return this.attached;
}

function onAttach_1(){
  if (this.attached) {
    throw new IllegalStateException();
  }
  this.attached = true;
}

function onDetach_1(){
  if (!this.attached) {
    throw new IllegalStateException();
  }
  this.attached = false;
}

function TextNode(){
}

_ = TextNode.prototype = new Widget();
_.isAttached = isAttached_1;
_.onAttach = onAttach_1;
_.onDetach = onDetach_1;
_.typeId$ = 82;
_.attached = false;
_.textElement = null;
function init_0(){
  !!$stats && $stats({moduleName:$moduleName, subSystem:'startup', evtGroup:'moduleStartup', millis:(new Date()).getTime(), type:'onModuleLoadStart', className:'org.cobogw.gwt.demo.widgets.client.WidgetsDemo'});
  $onModuleLoad(new WidgetsDemo());
}

function gwtOnLoad(errFn, modName, modBase){
  $moduleName = modName;
  $moduleBase = modBase;
  if (errFn)
    try {
      init_0();
    }
     catch (e) {
      errFn(modName);
    }
   else {
    init_0();
  }
}

function nullMethod(){
}

var _3Ljava_lang_String_2_classLit = createForArray('[Ljava.lang.', 'String;'), _3_3D_classLit = createForArray('', '[[D'), _3Lcom_google_gwt_user_client_HistoryListener_2_classLit = createForArray('[Lcom.google.gwt.user.client.', 'HistoryListener;'), _3Lcom_google_gwt_user_client_ui_Widget_2_classLit = createForArray('[Lcom.google.gwt.user.client.ui.', 'Widget;'), _3I_classLit = createForArray('', '[I'), _3Ljava_lang_Object_2_classLit = createForArray('[Ljava.lang.', 'Object;'), _3_3I_classLit = createForArray('', '[[I'), _3Lcom_google_gwt_core_client_JavaScriptObject_2_classLit = createForArray('[Lcom.google.gwt.core.client.', 'JavaScriptObject$;');
$stats && $stats({moduleName:'org.cobogw.gwt.demo.widgets.WidgetsDemo',subSystem:'startup',evtGroup:'moduleStartup',millis:(new Date()).getTime(),type:'moduleEvalEnd'});
if ($wnd.org_cobogw_gwt_demo_widgets_WidgetsDemo) $wnd.org_cobogw_gwt_demo_widgets_WidgetsDemo.onScriptLoad();
--></script></body></html>
